Bug 443161 - Canvas doesn't refresh and clear vector after deletion objects if the layer is moved with a move tool
Summary: Canvas doesn't refresh and clear vector after deletion objects if the layer i...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Vector (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-30 11:52 UTC by Raghavendra kamath
Modified: 2021-09-30 15:50 UTC (History)
2 users (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 Raghavendra kamath 2021-09-30 11:52:33 UTC
SUMMARY
The vector shapes don't get cleared after deleting them from the canvas If you have used move tool earlier. They remain in position and also the thumbnail shows them.

STEPS TO REPRODUCE
1. Open Krita and create a new document. Then create a new vector layer
2. Add an object on this vector layer.
3. Select the move tool and move the vector layer with this tool
4. Switch to shape selection too and select the vector object on the vector layer and press delete

OBSERVED RESULT
Vector objects remain on the canvas even if they are deleted

EXPECTED RESULT
vector objects should get cleared and the canvas should refresh accordingly

This bug is present in both stable and nightly builds

This bug might also be somewhat related to an earlier solved bug - https://bugs.kde.org/show_bug.cgi?id=417016
Comment 1 Dmitry Kazakov 2021-09-30 13:06:59 UTC
Git commit cd07452f8e6f4fa4f2ec4a84062318cc6e331240 by Dmitry Kazakov.
Committed on 30/09/2021 at 13:06.
Pushed by dkazakov into branch 'master'.

Fix updates of shapes belonging to a transformed group

shapeInterface()->removeShape(this) must be called before we reset
the parent of the shape, because it calls shapeToBeRemovedFromHierarchy()
which issues updates for the shape removal. The latter call should have
access to the absolute transformation for these updates.

M  +4    -5    libs/flake/KoShape.cpp

https://invent.kde.org/graphics/krita/commit/cd07452f8e6f4fa4f2ec4a84062318cc6e331240
Comment 2 Dmitry Kazakov 2021-09-30 15:50:43 UTC
Git commit 25f7109161af140057b0699eda35077b06132879 by Dmitry Kazakov.
Committed on 30/09/2021 at 15:50.
Pushed by dkazakov into branch 'krita/5.0'.

Fix updates of shapes belonging to a transformed group

shapeInterface()->removeShape(this) must be called before we reset
the parent of the shape, because it calls shapeToBeRemovedFromHierarchy()
which issues updates for the shape removal. The latter call should have
access to the absolute transformation for these updates.

M  +4    -5    libs/flake/KoShape.cpp

https://invent.kde.org/graphics/krita/commit/25f7109161af140057b0699eda35077b06132879