SUMMARY This is most probably a side effect of the new check-box feature added in the layer docker. When the user imports a new layer krita doesn't switch active layer to the newly imported layer. user has to click on it again to activate it. Generally when people import a new layer they intend to move it or transform it or perform other operations on it. So it is ideal to have the newly imported layer to become automatically active. STEPS TO REPRODUCE 1. Open krita from the nightly build and create a new document 2. Import a layer either via Layer > Import/Export > Import layer or drag and drop an image 3. Notice the new layer is not automatically selected and active
This happens even to the newly added or created layer via the add button in the layer docker. Ideally Krita should switch to the newly created layer
Okay, looks like this has to be fixed like deif_lou suggested in the MR. The newly created layer has to be activated and selected to keep things consistent.
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1672
Git commit dc824a4c0c73e726950354d8f8a55ac25ac23424 by Sharaf Zaman. Committed on 14/12/2022 at 04:57. Pushed by rempt into branch 'master'. LayerBox: Fix the bug with layer not getting selected When a new layer was created we wouldn't select it due to selectionModel()->hasSelection() clause -- which assumed that if there was a already a layer selected then the new layer would clear selection when it shouldn't. In addition to this, there was a bug caused by currentChanged calling setData(). This resulted in dataChanged() being called by a signal which in turn called setCurrentIndex again but this time since no selection flags were persisted this would update the selection when it shouldn't. Now, we add a signal blocker since we're just adding a UserRole and the only calls that seem to rely on this signal are updateUI -- which gets called anyways. So, it should be safe, I assume. M +2 -7 plugins/dockers/layerdocker/NodeView.cpp https://invent.kde.org/graphics/krita/commit/dc824a4c0c73e726950354d8f8a55ac25ac23424
*** Bug 463035 has been marked as a duplicate of this bug. ***