[aseprite] 107/196: Added cancel drawing loop on key release (fix #1002)
Tobias Hansen
thansen at moszumanska.debian.org
Wed Apr 20 18:50:07 UTC 2016
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository aseprite.
commit edb2f971e5889cdcef8dc53b1b62a028794fd5c5
Author: Hunter99 <stephan.kessler at outlook.com>
Date: Fri Mar 25 14:27:38 2016 +0100
Added cancel drawing loop on key release (fix #1002)
---
src/app/ui/editor/drawing_state.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/app/ui/editor/drawing_state.cpp b/src/app/ui/editor/drawing_state.cpp
index f2bb12b..fe7a34d 100644
--- a/src/app/ui/editor/drawing_state.cpp
+++ b/src/app/ui/editor/drawing_state.cpp
@@ -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;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git
More information about the Pkg-games-commits
mailing list