Skip to content

Commit

Permalink
Don't rotate rectangular selection when we're in "subtract mode" and …
Browse files Browse the repository at this point in the history
…touch editor edges (fix aseprite#3976)

As Shift+Alt enables the subtract mode, if we touch an editor edges
and receive a MouseEnter message, we cannot update the selection
modifiers with the pressed Alt key because that will start rotating the
rectangular marquee automatically. We've to start rotating only if we
release the Alt key and then press it again (not by just moving the
mouse).

Recent regression introduced in bd91a64
when the ordering of MouseEnter/Move/Leave message order was fixed.
  • Loading branch information
Gasparoken committed Jul 24, 2023
1 parent 400456c commit 13d3bd5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/app/ui/editor/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1917,8 +1917,16 @@ bool Editor::onProcessMessage(Message* msg)

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

// Do not update tool loop modifiers when the mouse exits and/re-enters
// the editor area while we are inside the same tool loop (hasCapture()).
// E.g. This avoids starting to rotate a rectangular marquee (Alt key
// pressed) if we have the subtract mode on (Shift+Alt) and touch the
// editor edge (MouseLeave/Enter)
if (!hasCapture()) {
updateToolLoopModifiersIndicators();
updateQuicktool();
}
break;

case kMouseLeaveMessage:
Expand Down

0 comments on commit 13d3bd5

Please sign in to comment.