Skip to content

Commit

Permalink
Fix glitch with Selection Tool + Alt (fix aseprite#3976)
Browse files Browse the repository at this point in the history
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'.
  • Loading branch information
Gasparoken committed Jul 24, 2023
1 parent 400456c commit cde49b5
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/app/ui/editor/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1915,12 +1915,23 @@ bool Editor::onProcessMessage(Message* msg)
break;
}

case kMouseEnterMessage:
case kMouseEnterMessage: {
m_brushPreview.hide();
updateToolLoopModifiersIndicators();
updateQuicktool();
break;

// 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:
m_brushPreview.hide();
StatusBar::instance()->showDefaultText();
Expand Down

0 comments on commit cde49b5

Please sign in to comment.