Bug 517590 - Activating transform tool with multiple layers selected deselects layers
Summary: Activating transform tool with multiple layers selected deselects layers
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (other bugs)
Version First Reported In: 5.3.0-beta3
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2026-03-15 02:07 UTC by Lynx3d
Modified: 2026-06-11 10:37 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lynx3d 2026-03-15 02:07:44 UTC
When multiple layers are selected in the Layers docker, activating the Transform Tool will deselect all but one layer.
It still transforms all layers that were selected initially, but it's confusing, and only does so until resetting or applying the current transformation. If you wanted to do more operations on the selection (or just click "Reset" in the tool options), you need to re-select them first.

I noticed the brush tool now also deselects additional layers on a stroke, but it might be intentional since you can only paint on one layer after all.

It must be a somewhat recent change, because it does not happen with a 5.3 pre-alpha build from late last year.
Comment 1 wolthera 2026-03-15 08:43:53 UTC
I cannot reproduce this here on a nightly appimage on Kubuntu.

How are you activating the transform tool? Just by clicking the toolbox?
Comment 2 Lynx3d 2026-03-15 18:14:46 UTC
I think I found the reason you can't reproduce, if selecting a range with Shift+click the issue does not occur, but if you select multiple layers with Ctrl+click, it happens. I don't have the slightest clue why the selection process would matter, but it does.

I wonder if it has to do with this commit?
https://invent.kde.org/graphics/krita/-/commit/8c0e77b4f3a0be3d5761875b39e5689a6d10a890

Whether the tool is activated by shortcut or click in the toolbox does not make a diffrence for me...
Comment 3 Bug Janitor Service 2026-03-16 03:47:57 UTC
๐Ÿ›๐Ÿงน Thanks for your comment!

Automatically switching the status to REPORTED so the team can perform further triage.

In the future you may also do this yourself when providing needed information.
Comment 4 Freya Lupen 2026-03-17 02:48:43 UTC
Confirmed, Shift-clicking or using the checkbox is fine but Ctrl-clicking the layers causes this issue, and reverting 8c0e77b4 seems to fix it.
Comment 5 Dmitry Kazakov 2026-03-18 10:42:43 UTC
Okay, the problem is that when selecting the layers with "Ctrl" shortcut, `currentIndex()` of the view is set on the "last clicked" item, not on the "active" one. Hence, after the next user action, e.g. paint operation or the transform tool activation, the `currentIndex()` is switched, resetting the entire selection.
Comment 6 Bug Janitor Service 2026-06-04 17:23:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2814
Comment 7 Dmitry Kazakov 2026-06-11 10:37:31 UTC
Git commit f108829b486916bb4254e4e2da96dae6ff9df1f9 by Dmitry Kazakov, on behalf of Luna Lovecraft.
Committed on 11/06/2026 at 10:37.
Pushed by dkazakov into branch 'master'.

Fix layers getting deselected when starting transform

setExclusiveActiveItem in NodeView didn't properly change the current
index of the QTreeView

M  +2    -0    plugins/dockers/layerdocker/NodeView.cpp

https://invent.kde.org/graphics/krita/-/commit/f108829b486916bb4254e4e2da96dae6ff9df1f9
Comment 8 Dmitry Kazakov 2026-06-11 10:37:46 UTC
Git commit 2d1eb218a90dfd4e3075f89fd89eb57490be5a22 by Dmitry Kazakov, on behalf of Luna Lovecraft.
Committed on 11/06/2026 at 10:37.
Pushed by dkazakov into branch 'krita/6.0'.

Fix layers getting deselected when starting transform

setExclusiveActiveItem in NodeView didn't properly change the current
index of the QTreeView

M  +2    -0    plugins/dockers/layerdocker/NodeView.cpp

https://invent.kde.org/graphics/krita/-/commit/2d1eb218a90dfd4e3075f89fd89eb57490be5a22