Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Fix selection actions panel blinking when making a new selection

Luna Lovecrafte38406bd96f2
diff --git a/libs/ui/kis_selection_decoration.cc b/libs/ui/kis_selection_decoration.cc
index b186d65ad3..6dbe5a8ada 100644
--- a/libs/ui/kis_selection_decoration.cc
+++ b/libs/ui/kis_selection_decoration.cc
@@ -199,12 +199,14 @@ void KisSelectionDecoration::drawDecoration(QPainter& gc, const QRectF& updateRe
Q_UNUSED(updateRect);
Q_UNUSED(canvas);
+ // render Selection Action Bar first, so that it doesn't blink when making a new selection
+ m_selectionActionsPanel->draw(gc);
+
if ((m_mode == Ants && m_outlinePath.isEmpty()) ||
(m_mode == Mask && m_thumbnailImage.isNull())) return;
QTransform transform = converter->imageToWidgetTransform();
- gc.save();
gc.setTransform(transform, false);
if (m_mode == Mask) {
@@ -240,10 +242,6 @@ void KisSelectionDecoration::drawDecoration(QPainter& gc, const QRectF& updateRe
gc.setPen(m_antsPen);
gc.drawPath(m_outlinePath);
}
- gc.restore();
-
- // render Selection Action Bar
- m_selectionActionsPanel->draw(gc);
}
void KisSelectionDecoration::setVisible(bool v)