Created attachment 148616 [details] Undo G'MIC filter active layer SUMMARY *** NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols. See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** This is a self filed bug report to acknowledge TheTwo's bug in https://invent.kde.org/graphics/krita/-/merge_requests/1428. > When I perform the undo operation, it will not make the original layer become the active layer, but the one below. This is inconvenient. Is there any way to correct it? STEPS TO REPRODUCE 1. 2. 3. OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
Created attachment 148624 [details] gif I made a gif to illustrate it. Maybe I've discovered why: when gmic outputs multiple layers, the first layer is converted from the original layer and the following layers are added (which would explain why only one layer doesn't have position problems) If you activate the top layer after using the filter, it will be activated when undo So the question should be changed to "Activate the top layer after outputting multiple layers with gmic"
> Maybe I've discovered why: when gmic outputs multiple layers, the first layer is converted from the original layer and the following layers are added (which would explain why only one layer doesn't have position problems) I should probably dig into this, reusing a layer should re-set its properties; but first, cc Dmitry: do we have a way to set a given layer as current from code?
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
Assigning to myself. Let's see what I can do.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1465
Git commit 9bb3751ee8bf95774eb4e43e45c506b9a8fd1f45 by L. E. Segovia. Committed on 08/06/2022 at 16:52. Pushed by lsegovia into branch 'master'. G'MIC: Activate the newest added layer M +62 -3 plugins/extensions/qmic/kis_qmic_synchronize_layers_command.cpp https://invent.kde.org/graphics/krita/commit/9bb3751ee8bf95774eb4e43e45c506b9a8fd1f45
Git commit 885f08efb8a41fb3441179a916844fcf68479289 by L. E. Segovia. Committed on 08/06/2022 at 16:54. Pushed by lsegovia into branch 'krita/5.1'. G'MIC: Activate the newest added layer (cherry picked from commit 9bb3751ee8bf95774eb4e43e45c506b9a8fd1f45) M +62 -3 plugins/extensions/qmic/kis_qmic_synchronize_layers_command.cpp https://invent.kde.org/graphics/krita/commit/885f08efb8a41fb3441179a916844fcf68479289