| Summary: | Inconsistent undo may lead to data loss when creating a layer above global selection mask | ||
|---|---|---|---|
| Product: | [Applications] krita | Reporter: | paleh <paleh21669> |
| Component: | Layer Stack | Assignee: | Krita Bugs <krita-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | dimula73, penguinflyer2222 |
| Priority: | NOR | ||
| Version First Reported In: | 5.2.2 | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/graphics/krita/-/commit/45491cdab843c617e35983534fafbf81ad900f0a | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
paleh
2023-12-14 19:18:03 UTC
Confirmed. Some safe asserts are logged during this: > SAFE ASSERT (krita): "!m_d->parent || !parent" in file /libs/image/kis_paint_device.cc, line 1195 > SAFE ASSERT (krita): "!aboveThis || aboveThis->parent().data() == this" in file /libs/image/kis_node.cpp, line 471 This might have the same cause as bug 478519. Hi, paleh! Thank you for the report. The bug is indeed has the same cause as bug 478519. I have a fix for that bug that is going to be merge soon :) *** This bug has been marked as a duplicate of bug 478519 *** Git commit 45491cdab843c617e35983534fafbf81ad900f0a by Dmitry Kazakov. Committed on 11/01/2024 at 11:22. Pushed by dkazakov into branch 'master'. Fix inconsistent undo/redo of select/deselect/reselect actions Before the patch, the global selection actions operated with a raw selection object, not with a selection mask. It caused issues, when the user manually converted/moved the global selection mask into another position. The patch changes this behavior and makes the selection commands operate with the entire selection mask, which makes operations consistent. Related: bug 478519 M +1 -1 krita/kritamenu.action M +2 -0 libs/image/CMakeLists.txt A +24 -0 libs/image/KisImageGlobalSelectionManagementInterface.h [License: GPL(v2.0+)] A +39 -0 libs/image/commands/KisChangeDeselectedMaskCommand.cpp [License: GPL(v2.0+)] A +31 -0 libs/image/commands/KisChangeDeselectedMaskCommand.h [License: GPL(v2.0+)] A +21 -0 libs/image/commands/KisNotifySelectionChangedCommand.cpp [License: GPL(v2.0+)] A +24 -0 libs/image/commands/KisNotifySelectionChangedCommand.h [License: GPL(v2.0+)] M +18 -18 libs/image/commands/kis_deselect_global_selection_command.cpp M +3 -6 libs/image/commands/kis_deselect_global_selection_command.h M +25 -25 libs/image/commands/kis_reselect_global_selection_command.cpp M +3 -6 libs/image/commands/kis_reselect_global_selection_command.h M +36 -11 libs/image/commands/kis_set_global_selection_command.cpp M +3 -3 libs/image/commands/kis_set_global_selection_command.h M +22 -44 libs/image/kis_image.cc M +7 -26 libs/image/kis_image.h M +11 -7 libs/image/tests/kis_image_test.cpp M +4 -2 libs/libkis/Document.cpp M +1 -0 libs/ui/kis_action.h M +4 -0 libs/ui/kis_action_manager.cpp M +30 -9 libs/ui/kis_selection_manager.cc M +1 -0 libs/ui/kis_selection_manager.h https://invent.kde.org/graphics/krita/-/commit/45491cdab843c617e35983534fafbf81ad900f0a |