Bug 470344

Summary: Shift-right-clicking a file selection changes the selection if it was created with a shift-click
Product: [Applications] dolphin Reporter: Adam Fontenot <adam.m.fontenot+kde>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: kfm-devel
Priority: NOR    
Version: 23.04.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Adam Fontenot 2023-05-28 02:52:16 UTC
SUMMARY

(Note: I use left click = main click, right click = alternative click in this report. This is the default mouse behavior.)

If you are trying to permanently delete some files, it's common to hold down shift while opening the right click (context) menu to show the delete option (instead of "move to trash"). If you select a bunch of files by clicking and dragging a selection box over them, and then shift-right-click anywhere on the selection, the selection doesn't change (expected behavior). However if you create a selection with a shift-click, the shift-right-click incorrectly "updates" the selection as if you had shift-clicked before opening the context menu.

STEPS TO REPRODUCE
1. Select one file in dolphin.
2. Hold down shift and left click on a different file. All files from the first selected file to the now selected file (inclusive) will now be selected.
3. Hold down shift again, and right click on a file in the middle of the selection created in step 2. 

OBSERVED RESULT

A context menu opens, but the selected files change. The files selected will be the files that *would* have been selected if the click in step 3 had been a left click (or the same files that would be selected if step 2 was skipped).

EXPECTED RESULT

A context menu opens, and the selected files do not change. This would exactly mirror the behavior when shift-right-clicking a selection created by click and drag.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 6.3.3-arch1-1 (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION

I'm using "details" view in Dolphin, I have single-click set to open files (instead of double click), and I'm using a touchpad with physical right and left buttons.