[graphics/krita] libs/ui: Fix assistant not updating when toggled with an action

Dmitry Kazakov <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit bf570a89bcc9a6784a4f4b07eacf087635c1ccca by Dmitry Kazakov, on behalf of Luna Lovecraft.
Committed on 28/07/2026 at 11:30.
Pushed by dkazakov into branch 'master'.

Fix assistant not updating when toggled with an action

Before this commit when the  assistant is being toggled with an action
the canvas doesn't always update immediately, causing it to not be
visible until the canvas is hovered

BUG:522511

M  +5    -0    libs/ui/kis_painting_assistants_decoration.cpp

https://invent.kde.org/graphics/krita/-/commit/bf570a89bcc9a6784a4f4b07eacf087635c1ccca

diff --git a/libs/ui/kis_painting_assistants_decoration.cpp b/libs/ui/kis_painting_assistants_decoration.cpp
index c270a660afc..5eb9cdea9ed 100644
--- a/libs/ui/kis_painting_assistants_decoration.cpp
+++ b/libs/ui/kis_painting_assistants_decoration.cpp
@@ -475,6 +475,11 @@ void KisPaintingAssistantsDecoration::uncache()
     Q_FOREACH (KisPaintingAssistantSP assistant, assistants()) {
         assistant->uncache();
     }
+
+    // Redraw canvas decorations in case the change was made off canvas
+    if (d->m_canvas) {
+        d->m_canvas->updateCanvasDecorations();
+    }
 }
 void KisPaintingAssistantsDecoration::toggleAssistantVisible()
 {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.