summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio D'Urso <[email protected]>2014-09-10 12:16:05 +0200
committerFabio D'Urso <[email protected]>2014-09-10 12:18:35 +0200
commitb6d92a8e22377843e16ec6393c60f2aeb9d3866e (patch)
tree7172d3ffce64e61e96843c0979f9d083aa797984
parentf36d1de126a68bc679c88121a4e363ca6aac44c2 (diff)
pageview: React to Document::isAllowed(AllowNotes) changes in notifySetup
-rw-r--r--ui/pageview.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/pageview.cpp b/ui/pageview.cpp
index ba5d2d3..f0b62a6 100644
--- a/ui/pageview.cpp
+++ b/ui/pageview.cpp
@@ -879,8 +879,13 @@ void PageView::selectAll()
void PageView::notifySetup( const QVector< Okular::Page * > & pageSet, int setupFlags )
{
bool documentChanged = setupFlags & Okular::DocumentObserver::DocumentChanged;
+ const bool allownotes = d->document->isAllowed( Okular::AllowNotes );
const bool allowfillforms = d->document->isAllowed( Okular::AllowFillForms );
+ // allownotes may have changed
+ if ( d->aToggleAnnotator )
+ d->aToggleAnnotator->setEnabled( allownotes );
+
// reuse current pages if nothing new
if ( ( pageSet.count() == d->items.count() ) && !documentChanged && !( setupFlags & Okular::DocumentObserver::NewLayoutForPages ) )
{