Bug 279772

Summary: Adjustment layers (masks) show erratic behavior when rotating and undoing
Product: [Applications] krita Reporter: pentalis
Component: Filter LayersAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: dimula73, halla
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description pentalis 2011-08-09 23:52:32 UTC
This bug is complex and involves two (or more?) errors that shouldn't be there, but all are related.

How to reproduce:
1.- Create a layer.
3.- Fill it with a color.
2.- Add a mask to it (transparency mask shows the problem much better than a filter mask).
4.- Paint on the mask (with the eraser): try to limit yourself to an area smaller than the parent layer so you can see the problem.
5.- Select the layer.
6.- Rotate it 90º or 180º, you will observe that the mask has shrunk to encompass only to the rectangle surrounding the area that you formerly painted.
7.- Undo the action (ctrl + Z), now you will observe that the mask shrunk even further: it now only contains the _tiles_ required to contain the area that you painted.

Rotating the layer small amounts at a time (for example 5º at a time) and then rotating for a big amount, almost completely (or completely) solves the problem (the problem becomes less and less noticeable the more small rotations are performed before the big rotation).


Expected result:
Rotation and undoing rotations do not generate any kind of artifacts on the layer's masks.
Comment 1 Halla Rempt 2012-02-29 13:23:20 UTC
This still happens -- undo/redo sometimes fix it.
Comment 2 Dmitry Kazakov 2012-03-03 11:51:15 UTC
Git commit f80a2ff0fbe5f7a5aee88ad86378a3ffac7ba594 by Dmitry Kazakov.
Committed on 03/03/2012 at 13:49.
Pushed by dkazakov into branch 'master'.

Fixed rotation of layers

Just merged with the rotation code of the image

M  +50   -20   krita/image/kis_image.cc
M  +10   -1    krita/image/kis_image.h
M  +2    -2    krita/plugins/extensions/scripting/kritacore/krs_image.cpp
M  +2    -2    krita/plugins/extensions/scripting/kritacore/krs_image.h
M  +5    -5    krita/plugins/formats/jpeg/kis_jpeg_converter.cc
M  +1    -1    krita/ui/kis_image_manager.cc
M  +1    -23   krita/ui/kis_layer_manager.cc

http://commits.kde.org/calligra/f80a2ff0fbe5f7a5aee88ad86378a3ffac7ba594
Comment 3 Dmitry Kazakov 2012-03-07 12:23:43 UTC
Git commit bdee52d8df38e1fa0690e07d0268027371c6a38b by Dmitry Kazakov.
Committed on 03/03/2012 at 13:49.
Pushed by dkazakov into branch 'calligra/2.4'.

Fixed rotation of layers

Just merged with the rotation code of the image

M  +50   -20   krita/image/kis_image.cc
M  +10   -1    krita/image/kis_image.h
M  +2    -2    krita/plugins/extensions/scripting/kritacore/krs_image.cpp
M  +2    -2    krita/plugins/extensions/scripting/kritacore/krs_image.h
M  +5    -5    krita/plugins/formats/jpeg/kis_jpeg_converter.cc
M  +1    -1    krita/ui/kis_image_manager.cc
M  +1    -23   krita/ui/kis_layer_manager.cc

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