1
0
mirror of https://github.com/aseprite/aseprite.git synced 2025-04-02 22:21:21 +00:00

Added cancel drawing loop on key release (fix )

This commit is contained in:
Hunter99 2016-03-25 14:27:38 +01:00
parent b4ce12beb4
commit edb2f971e5

@ -215,6 +215,16 @@ bool DrawingState::onKeyDown(Editor* editor, KeyMessage* msg)
bool DrawingState::onKeyUp(Editor* editor, KeyMessage* msg)
{
m_toolLoopManager->releaseKey(msg->scancode());
// Cancel drawing loop
if (m_toolLoopManager->isCanceled()) {
destroyLoop(editor);
// Change to standby state
editor->backToPreviousState();
editor->releaseMouse();
}
return true;
}