Commit f8fe30e6 authored by Simone Gaiarin's avatar Simone Gaiarin
Browse files

Do not show annotation toolbar when quick annotation tool is selected

parent 0fb2058e
......@@ -100,6 +100,7 @@ public:
void slotSetColor(AnnotationColor colorType, const QColor &color = QColor());
void slotSelectAnnotationFont();
void slotToolBarVisibilityChanged(bool checked);
bool isQuickToolAction(QAction *aTool);
AnnotationActionHandler *q;
......@@ -493,6 +494,11 @@ void AnnotationActionHandlerPrivate::slotToolBarVisibilityChanged(bool checked)
}
}
bool AnnotationActionHandlerPrivate::isQuickToolAction(QAction *aTool)
{
return quickTools->contains(aTool);
}
AnnotationActionHandler::AnnotationActionHandler(PageViewAnnotator *parent, KActionCollection *ac)
: QObject(parent)
, d(new AnnotationActionHandlerPrivate(this))
......@@ -657,8 +663,10 @@ AnnotationActionHandler::AnnotationActionHandler(PageViewAnnotator *parent, KAct
d->selectTool(-1);
} else {
d->agLastAction = action;
// Show the annotation toolbar whenever actions are triggered (e.g using shortcuts)
d->aShowToolBar->setChecked(true);
// Show the annotation toolbar whenever builtin tool actions are triggered (e.g using shortcuts)
if (!d->isQuickToolAction(action)) {
d->aShowToolBar->setChecked(true);
}
}
});
......
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