Commit 03b2346e authored by Simone Gaiarin's avatar Simone Gaiarin
Browse files

Uncheck quick annotation when repopulating the quick tools menu

This prevents undefined states when the currently selected quick annotation is modified or deleted in the annotation settings.

BUG: 426026
FIXED-IN: 21.08
parent 616b0335
......@@ -348,6 +348,11 @@ void AnnotationActionHandlerPrivate::populateQuickAnnotations()
const QList<int> numberKeys = {Qt::Key_1, Qt::Key_2, Qt::Key_3, Qt::Key_4, Qt::Key_5, Qt::Key_6, Qt::Key_7, Qt::Key_8, Qt::Key_9, Qt::Key_0};
// to be safe and avoid undefined states of the currently selected quick annotation
if (isQuickToolAction(agTools->checkedAction())) {
for (auto action : *quickTools) {
......@@ -383,7 +388,7 @@ void AnnotationActionHandlerPrivate::populateQuickAnnotations()
favToolElement = annotator->quickTool(++favToolId);
if (!quickTools->isEmpty() && !aQuickTools->defaultAction()) {
if (!quickTools->isEmpty()) {
QAction *separator = new QAction();
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