Bug 338953

Summary: active item does not follow mouse selection if icon or text is not hovered
Product: [Applications] dolphin Reporter: Thomas Posch <bugs.kde.org>
Component: view-engine: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: arjunak234, emmanuelpescosta099, nate
Priority: NOR    
Version First Reported In: 4.14.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Thomas Posch 2014-09-09 17:23:48 UTC
When selecting an item (change in background colour)  and the mouse does not hover over the icon or the text, the active item (underlined) is not set to any selected item.

Reproducible: Always

Steps to Reproduce:
1. Open a folder with multiple files
2. Observe which item is underlined
3. Drag a rectangle with your mouse to select a file without hovering over the icon or name

Actual Results:  
The underlined item stays the same.

Expected Results:  
The last selected item is the active one, as it is if you hover icon or text as you select.
Comment 1 Emmanuel Pescosta 2014-09-09 22:46:57 UTC
Should we really set the active item to the last selected item? Can you give as some information why this is needed/should be implemented? Thanks!
Comment 2 Thomas Posch 2014-09-10 13:24:06 UTC
If you select an item
  * with the keyboard, 
  * with the mouse by clicking the + button,
  * while dragging a rectangle with the mouse and you just so happen to hover it,
the active item is the last selected.

Only if you don't hover the (any) item while dragging a rectangle the active item stays somewhere else.

I think that is inconsistent.

My use case:
I most often use dolphin in details mode. Also i switch often from using the mouse to using the keyboard.

I open a folder with a lot of folders inside. I scroll down some pages and after selecting an item with the mouse in the free space after the name (which is easier than pressing the + button after hovering) i might
  * press right to expand the just selected folder
  * press up/down to go to the previous/next item.

However, as the active item is somewhere else (the first item as i just entered the folder), a not visible folder is expanded when pressing right and the first item is a folder, nothing happens when pressing up, or, in any other case, the view just scrolls to the second item which is now selected and active.
That is not what i would expect.
Now i have to find my folder again and make sure it is actually active.

Does anyone actually make the last selected item not the active one on purpose?
Comment 3 Frank Reininghaus 2014-10-29 22:06:56 UTC
(In reply to bugs.kde.org from comment #2)
> Does anyone actually make the last selected item not the active one on
> purpose?

Please note that there might not be a "last selected item" at all. Imagine the case where you have 3 files in 2 rows in Icons View:

A B
C

If you press the left mouse button in the top left corner, you can move the cursor to the bottom right corner in three different ways:

1. Move the cursor first to the top right corner, and then to the bottom right corner. In that case, you would probably say that C is the "last selected item".

2. If you move the cursor to the bottom left corner first and then to the bottom right corner, then B would be the last selected item.

3. If you move the cursor diagonally from top left to bottom right (or you move the mouse so fast that we do not get any information about intermediate positions at all), then there is no last selected item.

I hope that this makes it clear that there is no way to determine a "last selected item" reliably.
Comment 4 Arjun AK 2014-12-26 12:51:25 UTC
>I hope that this makes it clear that there is no way to determine a "last selected item" reliably.

But if only one item is selected, can't the last selected item be set to the active item.
Comment 5 Nate Graham 2017-09-03 17:12:49 UTC
What you've requested is the behavior I'm seeing now in Dolphin 16.12.3