Bug 436166

Summary: Keyboard navigation and mouse over both move current index
Product: [Applications] plasma-systemmonitor Reporter: David Edmundson <kde>
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: ahiemstra, hsantanna, nate, plasma-bugs-null
Priority: NOR Keywords: usability
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.23
Sentry Crash Report:

Description David Edmundson 2021-04-25 14:15:34 UTC
If I have a list with 10 entries and I select item 5 by clicking (so it gets the dark blue selected)

Then hover item 2.

If I press down, on a widgets app I would move the selection to item 6.

In plasma-system monitor we move selection to item 3 which is unexpected
Comment 1 Bug Janitor Service 2021-08-23 15:15:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-systemmonitor/-/merge_requests/160
Comment 2 David Edmundson 2021-08-24 14:03:32 UTC
Git commit 7d6bdd008652ec5103339da4506fbbf3115a2ef3 by David Edmundson.
Committed on 24/08/2021 at 14:03.
Pushed by davidedmundson into branch 'master'.

Introduce concept of hoveredIndex

Rather than abusing the currentIndex for tracking hover introduce a new
row property. This brings it more in line with the QItemView on widgets.

This fixes an issue where keyboard navigation would be relative to the
mouse, not the last keyboard selected index.

This does mean we have to update the current index explicitly when a
click action occurs.

M  +10   -18   src/table/BaseCellDelegate.qml
M  +1    -0    src/table/BaseTableView.qml

https://invent.kde.org/plasma/plasma-systemmonitor/commit/7d6bdd008652ec5103339da4506fbbf3115a2ef3