Bug 297929 - transform tool switches back to previous layer on undo
Summary: transform tool switches back to previous layer on undo
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-11 21:09 UTC by Tom Hall
Modified: 2013-01-20 10:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hall 2012-04-11 21:09:11 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0
Build Identifier: 

When undoing the first transform action after selecting a new layer, the transform tool switches back to operating on the previous layer, although the newly selected layer remains selected.

Reproducible: Always

Steps to Reproduce:
1. Create at 2 layers.
2. Select the transform tool.
3. Select Layer 1.
4. Transform it.
5. Switch to Layer 2.
6. Transform it, but don't apply the transformation.
7. Switch to Layer 1.
8. Transform it, but don't apply the transformation.
9. Edit > Undo.
Actual Results:  
Layer 1 is still selected (in the layers docker), but the transform tool has switched back to operating on Layer 2. Also, the abandoned transformation on Layer 2 lives again, whereas if I switch back to Layer 2 manually (via the layers docker), the transformation is reset.

Expected Results:  
Something less weird... Probably:
Undo the transformation on Layer 1, but keep it selected and keep the transform tool operating on it. (Rationale: I selected Layer 1, so I probably mean to do something to it, I just did the wrong thing, so I undid it. I probably want to have another go at transforming Layer 1. There is the reset button in the transform tool options instead of undo, but that's an extra button to learn/find while, "I made a mistake > undo" is already hard-wired into my brain.)

git master
Comment 1 Halla Rempt 2012-04-27 12:15:17 UTC
Yes, I can confirm. The issue here is that the settings aren't reset on layer changes, but using the manual button. There may be other dragons...
Comment 2 Dmitry Kazakov 2013-01-20 10:48:21 UTC
Git commit 0e3a6beaba892879fc0f15b2dba0ce5975911daf by Dmitry Kazakov.
Committed on 20/01/2013 at 11:43.
Pushed by dkazakov into branch 'krita-fixed-transform-kazakov'.

Ported Transform Tool to strokes

There is one regression: the actions inside a single transform stroke
(that is until you applied the transformation) cannot be undone yet.

The undo of the transformation as a whole works perfectly.
Related: bug 251749, bug 313294, bug 310559, bug 297927

M  +4    -7    krita/image/kis_selection_transaction_data.cpp
M  +4    -2    krita/image/kis_selection_transaction_data.h
M  +2    -2    krita/image/kis_transaction.h
M  +1    -1    krita/image/kis_transform_visitor.h
M  +1    -1    krita/plugins/extensions/imagesize/imagesize.cc
M  +2    -1    krita/plugins/tools/defaulttools/strokes/move_selection_stroke_strategy.cpp
M  +2    -1    krita/plugins/tools/defaulttools/strokes/move_stroke_strategy.cpp
M  +1    -0    krita/plugins/tools/tool_transform2/CMakeLists.txt
M  +248  -521  krita/plugins/tools/tool_transform2/kis_tool_transform.cc
M  +24   -24   krita/plugins/tools/tool_transform2/kis_tool_transform.h
M  +4    -4    krita/plugins/tools/tool_transform2/kis_tool_transform_config_widget.cpp
M  +1    -1    krita/plugins/tools/tool_transform2/kis_tool_transform_config_widget.h
A  +204  -0    krita/plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp     [License: GPL (v2+)]
A  +97   -0    krita/plugins/tools/tool_transform2/strokes/transform_stroke_strategy.h     [License: GPL (v2+)]
M  +23   -7    krita/plugins/tools/tool_transform2/tool_transform_args.cc
M  +37   -8    krita/plugins/tools/tool_transform2/tool_transform_args.h
M  +2    -2    krita/ui/actions/kis_selection_action_factories.cpp
M  +1    -1    krita/ui/kis_mirror_visitor.cpp
M  +2    -2    krita/ui/tool/kis_selection_tool_helper.cpp

http://commits.kde.org/calligra/0e3a6beaba892879fc0f15b2dba0ce5975911daf