Bug 398814 - lose previously selected layer on undo of flatten image
Summary: lose previously selected layer on undo of flatten image
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: 4.1.1
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-18 18:32 UTC by wkg28406
Modified: 2018-09-24 07:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wkg28406 2018-09-18 18:32:24 UTC
Krita 4.1.1-4 (Arch Linux)

Tested with fresh configuration (removing existing ~/.local/share/krita, ~/.config/krita*)

Reproducible: Always

Steps:
1. Create new document (ctrl+n)
2. Layer > Flatten Image (ctrl+shift+e)
3. Undo (ctrl+z)

Results:
No layer selected, unable to perform action until manually select in layer docker.

Expected:
Previously selected layer, in this case Layer 2, selected and active.

Likely happens because new layer is created called "root Merged", thus when undone no longer has reference. This does not happen with normal merges (ctrl+e).
Comment 1 Dmitry Kazakov 2018-09-20 17:34:12 UTC
Git commit 8564a3a47e7813ca6ade09a680b19f1c1cddd4fa by Dmitry Kazakov.
Committed on 20/09/2018 at 17:08.
Pushed by dkazakov into branch 'master'.

Fix selecting of the layer after undoing Flatten Image

M  +2    -2    libs/image/kis_image.cc
M  +1    -1    libs/image/kis_image.h
M  +7    -2    libs/image/kis_layer_utils.cpp
M  +1    -1    libs/image/kis_layer_utils.h
M  +1    -1    libs/image/tests/kis_image_test.cpp
M  +1    -1    libs/libkis/Document.cpp
M  +1    -1    libs/ui/kis_layer_manager.cc
M  +1    -1    libs/ui/tests/kis_dummies_facade_base_test.cpp
M  +1    -1    libs/ui/tests/kis_node_model_test.cpp
M  +1    -1    plugins/extensions/separate_channels/kis_channel_separator.cc

https://commits.kde.org/krita/8564a3a47e7813ca6ade09a680b19f1c1cddd4fa
Comment 2 Halla Rempt 2018-09-24 07:25:11 UTC
Git commit 9e6e3edcbbaf7ac2c9d8ad1fa9a3c886e2be27f1 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 24/09/2018 at 07:05.
Pushed by rempt into branch 'krita/4.1'.

Fix selecting of the layer after undoing Flatten Image

M  +2    -2    libs/image/kis_image.cc
M  +1    -1    libs/image/kis_image.h
M  +7    -2    libs/image/kis_layer_utils.cpp
M  +1    -1    libs/image/kis_layer_utils.h
M  +1    -1    libs/image/tests/kis_image_test.cpp
M  +1    -1    libs/libkis/Document.cpp
M  +1    -1    libs/ui/kis_layer_manager.cc
M  +1    -1    libs/ui/tests/kis_dummies_facade_base_test.cpp
M  +1    -1    libs/ui/tests/kis_node_model_test.cpp
M  +1    -1    plugins/extensions/separate_channels/kis_channel_separator.cc

https://commits.kde.org/krita/9e6e3edcbbaf7ac2c9d8ad1fa9a3c886e2be27f1