Bug 361852 - pressing "Esc" doesn't clear the earlier transform position (continuous transform)
Summary: pressing "Esc" doesn't clear the earlier transform position (continuous trans...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-16 13:33 UTC by Raghavendra kamath
Modified: 2018-05-02 11:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
transform clear demo (1.83 MB, video/mp4)
2016-04-16 13:36 UTC, Raghavendra kamath
Details
Proposed patch for transform cancellation with multiple Esc presses (1.92 KB, patch)
2018-01-29 09:24 UTC, Dmitry Kazakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raghavendra kamath 2016-04-16 13:33:54 UTC
When a user wants to clear out previously done transformation and apply a new transformation , he has to press "Esc" key which clears the transformation. It is also noted on the docs here -> https://docs.krita.org/Transform_Tool 

How ever I am not able to clear out the earlier transformation 

Reproducible: Always

Steps to Reproduce:
1) Open a New document 

2) Scribble something in a new layer 

3) Press Ctrl + T to transform , rotate or do any transform and then apply it 

4) Press Ctrl + T again , as expected the previous transform position will show up

5) Now press "Esc" to clear earlier transform position 

6) Now press Ctrl + T again , you'll notice that the earlier transform is not cleared

Actual Results:  
continuous transform doesn't get cleared

Expected Results:  
the earlier transform positions should get cleared and new transform should be begun
Comment 1 Raghavendra kamath 2016-04-16 13:36:38 UTC
Created attachment 98418 [details]
transform clear demo

video depicting the bug
Comment 2 Dmitry Kazakov 2016-04-25 14:18:31 UTC
Git commit d3d45eddadb480ceb9630e1e6e08d18799435453 by Dmitry Kazakov.
Committed on 25/04/2016 at 14:17.
Pushed by dkazakov into branch 'master'.

Add ability to reset the transformation frame even when it was loaded form the previous action

Fixes T2326

M  +14   -1    plugins/tools/tool_transform2/kis_tool_transform.cc
M  +47   -0    plugins/tools/tool_transform2/tool_transform_args.cc
M  +1    -0    plugins/tools/tool_transform2/tool_transform_args.h

http://commits.kde.org/krita/d3d45eddadb480ceb9630e1e6e08d18799435453
Comment 3 Raghavendra kamath 2018-01-06 17:52:58 UTC
In 4.0 master this bug is somehow back.
Comment 4 Dmitry Kazakov 2018-01-10 14:18:07 UTC
Hi, Raghavendra!

I've just retested the transform tool and I cannot understand what is wrong with the current version. The point is that "Esc" key does not reset the transformation in our UIX, but cancels the whole operation with hiding GUI controls. If you press "Reset" button explicitly, then the transformation correctly resets to Identity. If you do any meaningful change after that and apply the transform, the saved state will be saved as well.

What exactly is wrong for you? How would you expect the UIX work?
Comment 5 Dmitry Kazakov 2018-01-29 08:39:01 UTC
We agreed on the following solution:

1) Single-press of Esc resets the state of the transform tool (equivalent of pressing "Reset" button)
2) If the state is already an identity state, the whole stroke is cancelled
Comment 6 Dmitry Kazakov 2018-01-29 08:43:25 UTC
Oh, it seems like the things are a bit more complicated. The current function of Escape button is "abandon the changes". That is recovers the content of the layer to the original state. And if I change it to handle resetting the transformations, it might become impossible to "undo and abandon all the changes"...
Comment 7 Dmitry Kazakov 2018-01-29 09:24:16 UTC
Created attachment 110201 [details]
Proposed patch for transform cancellation with multiple Esc presses

Please test this patch and say your opinion about the UIX
Comment 8 Raghavendra kamath 2018-02-03 06:38:08 UTC
The patch works as intended, thanks Dmitry
Comment 9 Raghavendra kamath 2018-04-14 05:05:53 UTC
Is this patch up in the master?
Comment 10 Dmitry Kazakov 2018-04-16 13:40:30 UTC
Git commit ef43e85ef2815354e64c83583b4b734455d9d605 by Dmitry Kazakov.
Committed on 16/04/2018 at 13:40.
Pushed by dkazakov into branch 'master'.

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@kde.org

M  +5    -1    plugins/tools/tool_transform2/kis_tool_transform.cc

https://commits.kde.org/krita/ef43e85ef2815354e64c83583b4b734455d9d605
Comment 11 Halla Rempt 2018-05-02 11:54:42 UTC
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@kde.org
(cherry picked from commit 59ffe8bf10c618e35632b466a34578fee79ca78b)

M  +5    -1    plugins/tools/tool_transform2/kis_tool_transform.cc

https://commits.kde.org/krita/c4740297fdf6ef5e5f8ea670098d69b9aaf1cd0d