Summary: | No layer is active after switching between views, except for the last opened view | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Tyson Tan <tysontanx> |
Component: | Layer Stack | Assignee: | Dmitry Kazakov <dimula73> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | halla, info, reinhart.schultz, silver.bullet |
Priority: | NOR | Keywords: | regression, release_blocker |
Version: | nightly build (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/krita/-/commit/580a313c993972442b42289c55cb9dae8c98dba6 | Version Fixed In: | |
Sentry Crash Report: |
Description
Tyson Tan
2024-07-26 09:00:29 UTC
I first tested with the files as arguments, and there it works now, but I can confirm the issue with drag & drop. Also happens to Main Menu -> File -> Open dialogue with multiple files selected. I have done some more testing today, and there were new findings. This bug has nothing to do with "opening files". It happens when "switching between views that has multiple layers". Procedure to reproduce: 1) Open 2 images with multiple layers, let's call the first image A, and the last image B; 2) Switch to image A, select a layer; 3) Switch to image B, then back to A; Result: Image A now has no active layer. Expected result: Image A should retain its active layer. Exception: If Image A has only 1 layer, that layer will still be active after switching views. When drag-and-dropping multiple single layer PNGs into Krita's window, the original report is still valid. > Procedure to reproduce:
> 1) Open 2 images with multiple layers, let's call the first image A, and the
> last image B;
> 2) Switch to image A, select a layer;
> 3) Switch to image B, then back to A;
>
> Result:
> Image A now has no active layer.
To be more specific about what exactly causes it and hopefully help find a fix, a good summary of the exact cause can be described like so:
If you switch away from a document and then switch back, the image will have no active layer unless the last selected layer was also the last created layer.
Doesn't matter how it was created. pasted, shortcut, duplicating.
It can be any layer type, like filter, or clone, or vector, or mask.
It can be renamed
It can be moved around the layer stack anywhere.
But if it's not the one selected when you switch documents, nothing will be selected when you switch back.
*** Bug 490636 has been marked as a duplicate of this bug. *** Git commit 3b5891816897a868630d3570f044df275bc7a197 by Dmitry Kazakov. Committed on 31/07/2024 at 09:08. Pushed by dkazakov into branch 'master'. Fix layer activation issue when opening multiple documents ... and switching between them. KisNodeManager may emit node change signal right inside setCanvas() call, which may be received by LayerBox **before** it gto received its own setCanvas() call. This workaround just checks if the node-to- be-activated actually belongs to the current image or not. Ideally, we should make the active layer code a bit more straight-forward and ensure that there is only one source of truth. But I'm not sure how to do that right now. Perhaps, during the QML rewite? M +14 -0 plugins/dockers/layerdocker/LayerBox.cpp https://invent.kde.org/graphics/krita/-/commit/3b5891816897a868630d3570f044df275bc7a197 Git commit 580a313c993972442b42289c55cb9dae8c98dba6 by Dmitry Kazakov. Committed on 31/07/2024 at 09:11. Pushed by dkazakov into branch 'krita/5.2'. Fix layer activation issue when opening multiple documents ... and switching between them. KisNodeManager may emit node change signal right inside setCanvas() call, which may be received by LayerBox **before** it gto received its own setCanvas() call. This workaround just checks if the node-to- be-activated actually belongs to the current image or not. Ideally, we should make the active layer code a bit more straight-forward and ensure that there is only one source of truth. But I'm not sure how to do that right now. Perhaps, during the QML rewite? M +14 -0 plugins/dockers/layerdocker/LayerBox.cpp https://invent.kde.org/graphics/krita/-/commit/580a313c993972442b42289c55cb9dae8c98dba6 Thank you, Dmitry! *** Bug 492671 has been marked as a duplicate of this bug. *** |