Bug 294216 - krita applies filter to selection after deselect
Summary: krita applies filter to selection after deselect
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Unlisted Binaries Linux
: NOR major
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-16 09:44 UTC by Halla Rempt
Modified: 2012-02-23 10:03 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 Halla Rempt 2012-02-16 09:44:03 UTC
Version:           svn trunk
OS:                Linux

This is a complicated bug. See http://www.davidrevoy.com/XYZ/2012-02-15_transform-tool-bug.pdf for a step by step.

In words:

* load an image (colorful, so it's clearer)
* select part
* copy/paste the selection to a new layer
* deselect
* select the new layer
* select the transform tool

---------> First bug: the transform area isn't bounded by the boundingrect of the new layer (which is smaller than the image) but by that of the first layer (which coincides with the image.

* execute a rotation with the transform tool
* merge down
* select the levels filter
* apply an adjustment

--------------> second bug: the filter is only applied on the rotated selection area we saw in the rotation tool.

This state is not persistent between loading/saving



Reproducible: Always

Steps to Reproduce:
X

Actual Results:  
X

Expected Results:  
X

X
Comment 1 Sven Langkamp 2012-02-19 14:35:57 UTC
Looks like this is a problem with the new global selection. The global selection is now a selection mask and for that deselect means selecting the whole mask.
Comment 2 Halla Rempt 2012-02-19 14:46:09 UTC
Yes, I agree. Dmitry promised he would look into it this week.
Comment 3 Dmitry Kazakov 2012-02-20 10:41:46 UTC
I'll take care of this bug =)
Comment 4 Dmitry Kazakov 2012-02-23 10:03:36 UTC
Git commit aa38fbf1d36c3e08b8eb505bb33b826dfa728ed8 by Dmitry Kazakov.
Committed on 23/02/2012 at 11:51.
Pushed by dkazakov into branch 'deselected-selections-kazakov'.

Fixed deselected selections

Now a selection cannot be "deselected". It either exists or does not exist.
When we deselect the global selection the corresponding mask is set
not-active and is left in the layer stack. When we need to "Reselect", we
just search for the last non-active mask and activate it.

These changes need testing!

M  +2    -16   krita/image/commands/kis_deselect_global_selection_command.cpp
M  +0    -2    krita/image/commands/kis_deselect_global_selection_command.h
M  +7    -8    krita/image/commands/kis_reselect_global_selection_command.cpp
M  +1    -1    krita/image/commands/kis_reselect_global_selection_command.h
M  +8    -15   krita/image/commands/kis_set_global_selection_command.cpp
M  +17   -5    krita/image/commands/kis_set_global_selection_command.h
M  +39   -37   krita/image/kis_image.cc
M  +19   -12   krita/image/kis_image.h
M  +5    -11   krita/image/kis_painter.cc
M  +1    -15   krita/image/kis_selection.cc
M  +0    -3    krita/image/kis_selection.h
M  +28   -23   krita/image/kis_selection_mask.cpp
M  +0    -13   krita/image/kis_selection_mask.h
M  +2    -6    krita/image/kis_selection_transaction_data.cpp
M  +0    -1    krita/image/kis_selection_transaction_data.h
M  +2    -4    krita/image/recorder/kis_recorded_filter_action.cpp
M  +50   -0    krita/image/tests/kis_image_test.cpp
M  +1    -0    krita/image/tests/kis_image_test.h
M  +5    -4    krita/image/tests/kis_pixel_selection_test.cpp
M  +49   -6    krita/image/tests/kis_selection_mask_test.cpp
M  +1    -1    krita/image/tests/kis_selection_mask_test.h
M  +0    -1    krita/plugins/tools/defaulttools/kis_tool_move.cc
M  +1    -1    krita/plugins/tools/tool_transform2/kis_tool_transform.cc
M  +1    -1    krita/sdk/tests/qimage_based_test.h
M  +1    -7    krita/ui/kis_layer_manager.cc
M  +17   -41   krita/ui/kis_mask_manager.cc
M  +0    -2    krita/ui/kis_mask_manager.h
M  +2    -2    krita/ui/kis_selection_decoration.cc
M  +6    -10   krita/ui/kis_selection_manager.cc
M  +1    -1    krita/ui/kis_statusbar.cc
M  +4    -3    krita/ui/tool/kis_selection_tool_helper.cpp

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