<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>517590</bug_id>
          
          <creation_ts>2026-03-15 02:07:44 +0000</creation_ts>
          <short_desc>Activating transform tool with multiple layers selected deselects layers</short_desc>
          <delta_ts>2026-06-11 10:37:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>Tools/Transform</component>
          <version>5.3.0-beta3</version>
          <rep_platform>Appimage</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>regression</keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Lynx3d">lynx.mw+kde</reporter>
          <assigned_to name="Dmitry Kazakov">dimula73</assigned_to>
          <cc>dimula73</cc>
    
    <cc>griffinvalley</cc>
    
    <cc>penguinflyer2222</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/krita/-/commit/2d1eb218a90dfd4e3075f89fd89eb57490be5a22</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2503398</commentid>
    <comment_count>0</comment_count>
    <who name="Lynx3d">lynx.mw+kde</who>
    <bug_when>2026-03-15 02:07:44 +0000</bug_when>
    <thetext>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&apos;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 &quot;Reset&quot; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2503429</commentid>
    <comment_count>1</comment_count>
    <who name="wolthera">griffinvalley</who>
    <bug_when>2026-03-15 08:43:53 +0000</bug_when>
    <thetext>I cannot reproduce this here on a nightly appimage on Kubuntu.

How are you activating the transform tool? Just by clicking the toolbox?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2503507</commentid>
    <comment_count>2</comment_count>
    <who name="Lynx3d">lynx.mw+kde</who>
    <bug_when>2026-03-15 18:14:46 +0000</bug_when>
    <thetext>I think I found the reason you can&apos;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&apos;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...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2503576</commentid>
    <comment_count>3</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2026-03-16 03:47:57 +0000</bug_when>
    <thetext>🐛🧹 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2503882</commentid>
    <comment_count>4</comment_count>
    <who name="Freya Lupen">penguinflyer2222</who>
    <bug_when>2026-03-17 02:48:43 +0000</bug_when>
    <thetext>Confirmed, Shift-clicking or using the checkbox is fine but Ctrl-clicking the layers causes this issue, and reverting 8c0e77b4 seems to fix it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2504258</commentid>
    <comment_count>5</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2026-03-18 10:42:43 +0000</bug_when>
    <thetext>Okay, the problem is that when selecting the layers with &quot;Ctrl&quot; shortcut, `currentIndex()` of the view is set on the &quot;last clicked&quot; item, not on the &quot;active&quot; one. Hence, after the next user action, e.g. paint operation or the transform tool activation, the `currentIndex()` is switched, resetting the entire selection.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2520657</commentid>
    <comment_count>6</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2026-06-04 17:23:46 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2814</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2522316</commentid>
    <comment_count>7</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2026-06-11 10:37:31 +0000</bug_when>
    <thetext>Git commit f108829b486916bb4254e4e2da96dae6ff9df1f9 by Dmitry Kazakov, on behalf of Luna Lovecraft.
Committed on 11/06/2026 at 10:37.
Pushed by dkazakov into branch &apos;master&apos;.

Fix layers getting deselected when starting transform

setExclusiveActiveItem in NodeView didn&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2522317</commentid>
    <comment_count>8</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2026-06-11 10:37:46 +0000</bug_when>
    <thetext>Git commit 2d1eb218a90dfd4e3075f89fd89eb57490be5a22 by Dmitry Kazakov, on behalf of Luna Lovecraft.
Committed on 11/06/2026 at 10:37.
Pushed by dkazakov into branch &apos;krita/6.0&apos;.

Fix layers getting deselected when starting transform

setExclusiveActiveItem in NodeView didn&apos;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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>