Bug 319332

Summary: Drag & Drop a layer from the Layer Box to the Canvas positions the layer weirdly
Product: [Applications] krita Reporter: Dmitry Kazakov <dimula73>
Component: UsabilityAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dmitry Kazakov 2013-05-04 18:50:33 UTC
It drops it in some weird positions.

I would expect one of the two ways it is handled:
1) Dropping a layer to the canvas from the Layer Box stands for the idiom "Duplicate a Layer"
2) Pressing, for example, Shift button would drop the center of the layer to the position of the cursor.

The second option is disputable, but the first one, I guess, is mandatory.
Comment 1 Dmitry Kazakov 2013-05-04 19:01:03 UTC
The same applies when D&D from the Layer Box of another instance of Krita to the Canvas of the current instance.
Comment 2 Dmitry Kazakov 2013-05-05 08:47:45 UTC
Git commit e501dbe6edce2b1173abf4ceeefa59a90c287879 by Dmitry Kazakov.
Committed on 05/05/2013 at 10:47.
Pushed by dkazakov into branch 'master'.

Fixed positioning of the image/layer Drag&Dropped to the Krita Canvas

Now the Drag&Drop of the image or a layer to the canvas works
in the following way:

1) [no modifiers pressed]

* Dropping Krita Layer (from Layer Box):
  Positions to the original offset in the original image. If it doesn't
  fit into new image, it drops to the center of the new image.

*Dropping an *image* (not URL) from Chromium or other application:
  Drops to the center of the image.

2) [Shift modifier is pressed]
Both types of pastes are recentered near the center of the new image.


3) URL's are always dropped as usual to the top-left corner of the image.
CCMAIL:kimageshop@kde.org

M  +30   -11   krita/ui/kis_view2.cpp

http://commits.kde.org/calligra/e501dbe6edce2b1173abf4ceeefa59a90c287879
Comment 3 Dmitry Kazakov 2013-05-08 18:08:38 UTC
Git commit 8fb27085803e844cbfac7663b2d0e4cb5fc86a80 by Dmitry Kazakov.
Committed on 05/05/2013 at 10:47.
Pushed by dkazakov into branch 'calligra/2.7'.

Fixed positioning of the image/layer Drag&Dropped to the Krita Canvas

Now the Drag&Drop of the image or a layer to the canvas works
in the following way:

1) [no modifiers pressed]

* Dropping Krita Layer (from Layer Box):
  Positions to the original offset in the original image. If it doesn't
  fit into new image, it drops to the center of the new image.

*Dropping an *image* (not URL) from Chromium or other application:
  Drops to the center of the image.

2) [Shift modifier is pressed]
Both types of pastes are recentered near the center of the new image.

3) URL's are always dropped as usual to the top-left corner of the image.
CCMAIL:kimageshop@kde.org

M  +30   -11   krita/ui/kis_view2.cpp

http://commits.kde.org/calligra/8fb27085803e844cbfac7663b2d0e4cb5fc86a80
Comment 4 Siddharth 2013-05-17 07:15:30 UTC
Git commit 954480d6388c0e364d7992e21c1775e4611b1c63 by Siddharth Sharma, on behalf of Dmitry Kazakov.
Committed on 05/05/2013 at 10:47.
Pushed by siddharthsharma into branch 'krita-psd-plugin-siddharth'.

Fixed positioning of the image/layer Drag&Dropped to the Krita Canvas

Now the Drag&Drop of the image or a layer to the canvas works
in the following way:

1) [no modifiers pressed]

* Dropping Krita Layer (from Layer Box):
  Positions to the original offset in the original image. If it doesn't
  fit into new image, it drops to the center of the new image.

*Dropping an *image* (not URL) from Chromium or other application:
  Drops to the center of the image.

2) [Shift modifier is pressed]
Both types of pastes are recentered near the center of the new image.


3) URL's are always dropped as usual to the top-left corner of the image.
CCMAIL:kimageshop@kde.org

M  +30   -11   krita/ui/kis_view2.cpp

http://commits.kde.org/calligra/954480d6388c0e364d7992e21c1775e4611b1c63