mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 13:21:34 +00:00
Fix ScrollingState crash (fix #2115)
Before this fix Aseprite was crashing when we kept holding the mouse middle button down, then pasting, and finally pressing undo.
This commit is contained in:
parent
c409494639
commit
2d3be681e0
@ -25,6 +25,14 @@ namespace app {
|
||||
virtual bool onKeyUp(Editor* editor, ui::KeyMessage* msg) override;
|
||||
virtual bool onUpdateStatusBar(Editor* editor) override;
|
||||
|
||||
virtual LeaveAction onLeaveState(Editor* editor, EditorState* newState) override {
|
||||
// Just discard this state if we want to enter to another state
|
||||
// e.g. if we want to enter to MovingPixelsState when the user
|
||||
// press Ctrl+V when we are scrolling, we have to just discard
|
||||
// this state (stop the scrolling action).
|
||||
return DiscardState;
|
||||
}
|
||||
|
||||
private:
|
||||
gfx::Point m_oldPos;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user