Issue #74: Highlighting text opens the sidebar every time

This commit is contained in:
Jakub Melka
2023-07-28 10:30:19 +02:00
parent 44ae998a88
commit 196904c04f
2 changed files with 2 additions and 1 deletions

View File

@ -553,6 +553,7 @@ public:
bool hasReset() const { return m_flags.testFlag(Reset); } bool hasReset() const { return m_flags.testFlag(Reset); }
bool hasPageContentsChanged() const { return m_flags.testFlag(PageContents); } bool hasPageContentsChanged() const { return m_flags.testFlag(PageContents); }
bool hasPreserveUndoRedo() const { return m_flags.testFlag(PreserveUndoRedo); }
bool hasFlag(ModificationFlag flag) const { return m_flags.testFlag(flag); } bool hasFlag(ModificationFlag flag) const { return m_flags.testFlag(flag); }
operator PDFDocument*() const { return m_document; } operator PDFDocument*() const { return m_document; }

View File

@ -464,7 +464,7 @@ void PDFViewerMainWindow::setDocument(const pdf::PDFModifiedDocument& document)
{ {
m_sidebarDockWidget->hide(); m_sidebarDockWidget->hide();
} }
else else if (document.hasReset() && !document.hasPreserveUndoRedo())
{ {
m_sidebarDockWidget->show(); m_sidebarDockWidget->show();
} }