From 3cec15b5e8a4a96ceedc339d3cf5606c04843e5d Mon Sep 17 00:00:00 2001 From: Gaspar Capello Date: Fri, 21 Jul 2023 12:46:23 -0300 Subject: [PATCH] Fix glitch with Selection Tool + Alt (fix #3976) Prior to this fix, when the mouse exited and re-entered the editor area, the Subtract Selection quick command would inadvertently change to 'rotate shape'. --- src/app/ui/editor/editor.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/app/ui/editor/editor.cpp b/src/app/ui/editor/editor.cpp index 63478f6c13f..fc80251b1a1 100644 --- a/src/app/ui/editor/editor.cpp +++ b/src/app/ui/editor/editor.cpp @@ -1917,8 +1917,19 @@ bool Editor::onProcessMessage(Message* msg) case kMouseEnterMessage: m_brushPreview.hide(); - updateToolLoopModifiersIndicators(); - updateQuicktool(); + + // Not update tool loop modifiers when the mouse exits and + // re-enters the editor area while the mouse has an + // active 'click'. + // If it isn't done, when the mouse exits and re-enters the + // editor area, the Subtract Selection quick command + // (for example) will change to 'rotate shape'. + // More details: + // https://github.com/aseprite/aseprite/issues/3976 + if (!hasCapture()) { + updateToolLoopModifiersIndicators(); + updateQuicktool(); + } break; case kMouseLeaveMessage: