-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WLibraryTableView: Refocus or reselect on FocusIn events (continued) #3090
Conversation
Fix unintended side-effects caused by de62420
unfortunately 3ec08c1 created another issue after switching features:
the last commit fixes this. |
src/widget/wlibrarytableview.cpp
Outdated
} | ||
// Refocus the first selected index | ||
setCurrentIndex(selectionModel()->selectedIndexes().first()); | ||
selectRow(currentIndex().row()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not at all sure if all the above checks are necessary, but this last line fixes the issue described above and allows arrow key navigation again.
Please test with controllers and keyboard! if there are no issues I'd like to squash this to the essence and merge asap. |
@uklotzde It would be nice if you could have a look at this when you have some spare minutes.. |
bd34931
to
9828a41
Compare
Just compiled and tested commit 9828a41 (Gentoo Linux 64-Bit). No issues found on Denon MC3000 and MC7000 controllers. Also the bug mentioned in lp:1894901 seems to be fixed now. LGTM. Thanks for fixing this, ronso0.
I was trying to reproduce this issue here using commit 3ec08c1 but with no luck. Maybe I did something wrong? |
I tested with a keyboard only and 458aad1 to check wether there's a cell focused. |
@ronso0 AFAIR the MC7000 uses "MoveVertical" / "ScrollVertical". I'm not quite sure what the MC3000 uses for moving the selection. Maybe the more deprecated "SelectNextTrack" / "SelectPrevTrack"? Nevertheless, I wasn't able to reproduce this issue here. |
Ready for merge if all addressed issues are fixed. |
It works as probably intended, so it is mergable from this point of view. If you select a track in a Playlist, select a track in the Track's list and than move back the first track in the playlist is selected. I am unsure if it is feasible to store the selected track in the playlist. Maybe for at least one? What do you think? |
When you switch between two long playlists, the scollbar position remains. Looking at
The current behavior is probably a bug, because the address of the TrackModel does not change when changing the playlist. Like a hash code created from "playlist_path" in or such. Once this is fixed, we can store the selection in the same way. |
LGTM. The remaining issues cannot address here. |
Exactly. That was the issue I attempted to fix with #2378 which unfortunately doesn't save the state/selection for multiple Crates but just for each library feature instead. Building upon #2046 still seems viable to me. |
based on #3086
fixes unintended side-effects caused by de62420 from #3049