Refactoring - prepare for undo/redo and document modification

This commit is contained in:
Jakub Melka
2020-04-25 14:21:06 +02:00
parent 76af397b07
commit 57b3711210
28 changed files with 318 additions and 114 deletions

View File

@ -343,6 +343,16 @@ OCState PDFOptionalContentActivity::getState(PDFObjectReference ocg) const
return OCState::Unknown;
}
void PDFOptionalContentActivity::setDocument(const PDFDocument* document)
{
if (m_document != document)
{
Q_ASSERT(document);
m_document = document;
m_properties = document->getCatalog()->getOptionalContentProperties();
}
}
void PDFOptionalContentActivity::setState(PDFObjectReference ocg, OCState state, bool preserveRadioButtons)
{
auto it = m_states.find(ocg);