Commit 99209e29 authored by Bharadwaj Raju's avatar Bharadwaj Raju 📚 Committed by Nate Graham
Browse files

Make Quick Annotations button open the full toolbar when no Quick Annotations are configured

parent f9ca87c8
......@@ -396,10 +396,15 @@ void AnnotationActionHandlerPrivate::populateQuickAnnotations()
// set the default action
if (quickTools.isEmpty()) {
aQuickTools->setDefaultAction(aQuickTools);
aShowToolBar->setVisible(false);
aQuickTools->addAction(aToolBarVisibility);
aQuickTools->setDefaultAction(aToolBarVisibility);
Okular::Settings::setQuickAnnotationDefaultAction(0);
Okular::Settings::self()->save();
} else {
aShowToolBar->setVisible(true);
aQuickTools->removeAction(aToolBarVisibility);
aQuickTools->setDefaultAction(aQuickTools);
int defaultAction = Okular::Settings::quickAnnotationDefaultAction();
if (isFirstTimePopulated && defaultAction < quickTools.count()) {
// we can reach here also if no quick tools were defined before, in that case defaultAction is correctly equal to zero
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment