Bug 288390 - Ctrl+drag and Shift+drag images to Dolphin changes the image selection
Summary: Ctrl+drag and Shift+drag images to Dolphin changes the image selection
Status: RESOLVED INTENTIONAL
Alias: None
Product: digikam
Classification: Applications
Component: Usability-Drag&Drop (show other bugs)
Version: 2.3.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-07 10:18 UTC by DGardner
Modified: 2017-08-02 15:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.5.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DGardner 2011-12-07 10:18:09 UTC
Version:           2.3.0 (using KDE 4.7.3) 
OS:                Linux

When I want to copy the selected images in digiKam to an external folder, I select the images and then use Ctrl+drag to copy them to a folder in a Dolphin (file manager) window. This saves me having to select "Copy" from a pop-up menu in Dolphin if I do not hold down the Ctrl key when dragging. Similarly, holding down the Shift key while dragging saves having to select the "Move" option from the pop-up menu. Both of these operations do not work properly, as they change the selection in digiKam when the drag is initiated. The selection is not changed when the modifier key is not used.

Reproducible: Always

Steps to Reproduce:
Scenario for "Ctrl+drag":

1. Open digiKam and a Dolphin window side-by-side.
2. Select two images in digiKam.
3. Hold down the Ctrl key and use the mouse to drag the selected images to Dolphin (by dragging one of the selected images).
4. Release the mouse button over Dolphin.

An alternative to step 3 is to initiate the drag on an image that is not selected. Similarly, use Shift+drag and again initiate the drag on an image that is not one of those selected.

Actual Results:  
Observe that the selection of the image used to initiate the Ctrl+drag operation is toggled before the images are copied. Either one fewer or one more image than intended will be copied.

Using Shift+drag, if the drag is initiated over a selected image, it works OK. However, if the drag is initiated over an un-selected image, the selection will be extended and more images than intended will be moved.

Expected Results:  
Dragging without using a modifier key does not change the selection, so dragging with a modifier key should not change the selection either. When the dragging is initiated over an un-selected image, then only that image should be dragged/copied/moved. That is consistent with the behaviour of dragging without a modifier key. It also prevents potentially disastrous unintentional move operations where the tag metadata will be lost when the images are moved back to digiKam to repair the damage. (This happened to me in the past when there was a problem with digiKam/Dolphin that caused all drags to be interpreted as move operations without any modifiers or pop-up menus.)

I suspect that digiKam need to be modified to change the selection on Ctrl+left-click or Shift+left-click only when the mouse button is released, not when it is pressed.
Comment 1 Marcel Wiesweg 2011-12-25 11:06:48 UTC
Ctrl and Shift modify the meaning of a mouse click in the context of icon view selection. Digikam's behavior is consistent with dolphin (which I take as reference for KDE icon views)
If you intend to use Ctrl and Shift in the context of modifying the drop operation in dolphin, press it after you have initiated the drag.