<?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>459111</bug_id>
          
          <creation_ts>2022-09-14 15:52:04 +0000</creation_ts>
          <short_desc>Pasted data in image created from clipboard is placed at the position of the original selection.</short_desc>
          <delta_ts>2022-10-28 11:01:36 +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>General</component>
          <version>5.1.1</version>
          <rep_platform>Microsoft Windows</rep_platform>
          <op_sys>Microsoft Windows</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 name="Alex May">psychicteeth</reporter>
          <assigned_to name="vanyossi">ghevan</assigned_to>
          <cc>ghevan</cc>
    
    <cc>halla</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/krita/commit/2292eb10386376a4c6c08c298303672a45f044f5</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>2152649</commentid>
    <comment_count>0</comment_count>
    <who name="Alex May">psychicteeth</who>
    <bug_when>2022-09-14 15:52:04 +0000</bug_when>
    <thetext>SUMMARY
Copying image data from a large image and pasting it into a new image created using &quot;create from clipboard&quot; leaves it offset from the new canvas and invisible until transformed to bring it back to the visible area.


STEPS TO REPRODUCE
1. Open or create an image
2. Select a small area of the image
3. Copy to clipboard
4. Create new image, selecting Create From Clipboard
5. Paste the copied data

OBSERVED RESULT
The pasted data is invisible. Selecting the Transform Tool and zooming out reveals that the data has been placed where it was in the original image, even though that&apos;s off the canvas in the new image

EXPECTED RESULT
The pasted data should be visible.

SOFTWARE/OS VERSIONS
Windows: Windows 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2154570</commentid>
    <comment_count>1</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2022-09-20 12:09:12 +0000</bug_when>
    <thetext>The last step -- the paste does produce this issue. It&apos;s not necessary to create from clipboard.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2157441</commentid>
    <comment_count>2</comment_count>
    <who name="vanyossi">ghevan</who>
    <bug_when>2022-09-30 02:03:24 +0000</bug_when>
    <thetext>I suppose if the paste data is outside the image, we can change behavior either to
A: paste at current cursor position
B: paste at top left corner of the document</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2157676</commentid>
    <comment_count>3</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2022-10-01 05:40:54 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1602</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2166279</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2022-10-28 11:00:20 +0000</bug_when>
    <thetext>Git commit e41db7b620a6d8197a44ce7cddb5f16ea59d1878 by Dmitry Kazakov, on behalf of Ivan Yossi.
Committed on 28/10/2022 at 10:59.
Pushed by dkazakov into branch &apos;master&apos;.

Fix paste outside of image boundaries

If paste data does not intersect canvas, the image is pasted
at the center of the canvas.

M  +27   -12   libs/ui/actions/KisPasteActionFactories.cpp

https://invent.kde.org/graphics/krita/commit/e41db7b620a6d8197a44ce7cddb5f16ea59d1878</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2166280</commentid>
    <comment_count>5</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2022-10-28 11:01:36 +0000</bug_when>
    <thetext>Git commit 2292eb10386376a4c6c08c298303672a45f044f5 by Dmitry Kazakov, on behalf of Ivan Yossi.
Committed on 28/10/2022 at 11:01.
Pushed by dkazakov into branch &apos;krita/5.1&apos;.

Fix paste outside of image boundaries

If paste data does not intersect canvas, the image is pasted
at the center of the canvas.


(cherry picked from commit e41db7b620a6d8197a44ce7cddb5f16ea59d1878)

M  +27   -12   libs/ui/actions/KisPasteActionFactories.cpp

https://invent.kde.org/graphics/krita/commit/2292eb10386376a4c6c08c298303672a45f044f5</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>