Bug 297927

Summary: transform tool does not work on group layer
Product: krita Reporter: Tom Hall <tahall256>
Component: Tools/TransformAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Tom Hall 2012-04-11 20:25:00 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0
Build Identifier: 

Selecting the transform tool with a "Group Layer" selected produces some odd 'decorations' and a ghostly layer copy, but does not transform anything.

Reproducible: Always

Steps to Reproduce:
1.Create a "Group Layer".
2. Put some layers in it (with something on them so you can recognise them/tell if they're transformed).
3. Select the transform tool.
4. Try a transformation.
Actual Results:  
1. When the transform tool is selected, the various handles (normally in centre, corners and middle of sides) appear in the top left hand corner. A semitransparent copy of the last layer in the group to be selected appears translated such that it is centred at the the top left of the canvas and sized to match the layer as it was when the transform tool was selected (zooming in and out doesn't affect the size of the ghostly layer copy).
2. When the user attempts to transform the layer group, nothing happens.

Expected Results:  
Allow the Group Layer to be transformed as though it were a single layer, i.e. apply the same transformation simultaneously to all layers in the group.

This would be handy to transform part of an image (not the whole image) without having to merge the layers that contain that part of the image.

Compiled from git master.
Comment 1 Halla Rempt 2012-04-27 12:14:23 UTC
Thanks, yes, this is broken :-(
Comment 2 Dmitry Kazakov 2013-01-20 10:48:26 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 297929

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
Comment 3 Dmitry Kazakov 2013-01-31 15:40:05 UTC
Git commit e30395b251684b8cfdbbcce6606d9e2b0edb30e1 by Dmitry Kazakov.
Committed on 31/01/2013 at 16:16.
Pushed by dkazakov into branch 'master'.

Added an ability to transform layers recursively with a Transform Tool

Now the transform tool supports transforming of a group of layers or
masks recursively in a single pass. You can use it for transforming a
set of layers grouped into a Group Layer or just transform a single
layer with all its masks (e.g. with transparency masks). This option
is enabled by default, but you can disable it by switching a small
button in the transform tool configuration docker. This button has a
icon of a small spider (the tool "crawls" through the layers :) ) [0].

It would be cool, if someone tested it a bit ;)

[0] - you can suggest any other icon for this, actually =)
Related: bug 314176
CCMAIL:kimageshop@kde.org

M  +5    -4    krita/image/kis_processing_visitor.cpp
M  +4    -2    krita/image/kis_processing_visitor.h
M  +1    -0    krita/plugins/tools/tool_transform2/CMakeLists.txt
M  +56   -40   krita/plugins/tools/tool_transform2/kis_tool_transform.cc
M  +5    -5    krita/plugins/tools/tool_transform2/kis_tool_transform.h
M  +11   -0    krita/plugins/tools/tool_transform2/kis_tool_transform_config_widget.cpp
M  +3    -0    krita/plugins/tools/tool_transform2/kis_tool_transform_config_widget.h
A  +-    --    krita/plugins/tools/tool_transform2/krita_tool_transform_recursive.png
M  +96   -44   krita/plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp
M  +31   -15   krita/plugins/tools/tool_transform2/strokes/transform_stroke_strategy.h
M  +35   -16   krita/plugins/tools/tool_transform2/wdg_tool_transform.ui

http://commits.kde.org/calligra/e30395b251684b8cfdbbcce6606d9e2b0edb30e1