[krita/krita/4.0] plugins/tools/tool_transform2: Implement double Esc key press shortcut for canceling continued transform mode
Boudewijn Rempt
null at kde.org
Wed May 2 11:54:32 UTC 2018
Git commit c4740297fdf6ef5e5f8ea670098d69b9aaf1cd0d by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 02/05/2018 at 11:54.
Pushed by rempt into branch 'krita/4.0'.
Implement double Esc key press shortcut for canceling continued transform mode
Now if you start a continued transform mode in the transform tool,
you have two options:
1) Press Esc key once to reset the transformation to non-transformed
state
2) Press Esc key twice to cancel changing the continued transformation
CC:kimageshop at kde.org
BUG:361852
(cherry picked from commit 59ffe8bf10c618e35632b466a34578fee79ca78b)
M +5 -1 plugins/tools/tool_transform2/kis_tool_transform.cc
https://commits.kde.org/krita/c4740297fdf6ef5e5f8ea670098d69b9aaf1cd0d
diff --git a/plugins/tools/tool_transform2/kis_tool_transform.cc b/plugins/tools/tool_transform2/kis_tool_transform.cc
index 07d7c1f21c4..79deb4d9e6f 100644
--- a/plugins/tools/tool_transform2/kis_tool_transform.cc
+++ b/plugins/tools/tool_transform2/kis_tool_transform.cc
@@ -770,7 +770,11 @@ void KisToolTransform::requestStrokeEnd()
void KisToolTransform::requestStrokeCancellation()
{
- cancelStroke();
+ if (m_currentArgs.isIdentity()) {
+ cancelStroke();
+ } else {
+ slotResetTransform();
+ }
}
void KisToolTransform::startStroke(ToolTransformArgs::TransformMode mode, bool forceReset)
More information about the kimageshop
mailing list