<?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>512771</bug_id>
          
          <creation_ts>2025-11-29 23:09:50 +0000</creation_ts>
          <short_desc>Dragging a layer onto its own canvas duplicates it</short_desc>
          <delta_ts>2025-12-08 10:31:31 +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>Usability</component>
          <version>5.2.13</version>
          <rep_platform>Other</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></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>dra.w.p.il.e+bugskde</reporter>
          <assigned_to name="Krita Bugs">krita-bugs-null</assigned_to>
          
          
          <cf_commitlink>https://invent.kde.org/graphics/krita/-/commit/261c8bd4af9e89c34a5bf49263653d5cc7f17373</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>2473578</commentid>
    <comment_count>0</comment_count>
    <who name="">dra.w.p.il.e+bugskde</who>
    <bug_when>2025-11-29 23:09:50 +0000</bug_when>
    <thetext>When you drag a layer from the layer list onto a canvas, it will create a copy of that layer on that canvas. While that&apos;s useful if you&apos;re dragging between different canvases, doing it on the same canvas basically just leads to users accidentally duplicating layers if they are a bit too sloppy with selecting or reordering them.

Solution would be to check where the layer came from in the drop handler and not letting you drop a layer on the canvas it came from.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2474804</commentid>
    <comment_count>1</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2025-12-06 10:01:57 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2557</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2475108</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2025-12-08 10:31:09 +0000</bug_when>
    <thetext>Git commit 7d6f717d0e2451e26b99a206e8441c59989ded58 by Dmitry Kazakov, on behalf of Carsten Hartenfels.
Committed on 08/12/2025 at 10:30.
Pushed by dkazakov into branch &apos;master&apos;.

Don&apos;t allow dragging layers onto their own canvas

Because it really only ever gets used accidentally by users being a bit
sloppy about selecting or dragging layers, resulting in them duplicating
layers unintentionally.

M  +33   -21   libs/ui/KisView.cpp
M  +2    -0    libs/ui/KisView.h
M  +6    -0    libs/ui/kis_mimedata.cpp
M  +2    -0    libs/ui/kis_mimedata.h

https://invent.kde.org/graphics/krita/-/commit/7d6f717d0e2451e26b99a206e8441c59989ded58</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2475109</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2025-12-08 10:31:31 +0000</bug_when>
    <thetext>Git commit 261c8bd4af9e89c34a5bf49263653d5cc7f17373 by Dmitry Kazakov.
Committed on 08/12/2025 at 10:31.
Pushed by dkazakov into branch &apos;krita/5.2&apos;.

Don&apos;t allow dragging layers onto their own canvas

Because it really only ever gets used accidentally by users being a bit
sloppy about selecting or dragging layers, resulting in them duplicating
layers unintentionally.


(cherry picked from commit 7d6f717d0e2451e26b99a206e8441c59989ded58)

Co-authored-by: Carsten Hartenfels &lt;carsten.hartenfels@pm.me&gt;

M  +33   -21   libs/ui/KisView.cpp
M  +2    -0    libs/ui/KisView.h
M  +6    -0    libs/ui/kis_mimedata.cpp
M  +2    -0    libs/ui/kis_mimedata.h

https://invent.kde.org/graphics/krita/-/commit/261c8bd4af9e89c34a5bf49263653d5cc7f17373</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>