controllers can't focus tracks table item if there is only one

Bug #1808632 reported by ronso0
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Low
ronso0

Bug Description

Reproduce:
* go to Tracks
* type search terms that would yield exactly one result
= one item/row in tracks table
* move focus to tracks table (Tab or controller key)
* try to focus/select the one row
= neither up/down arrows (keyboard) or [Library],MoveVertical or [..],ScrollVertical allow to focus the item

But pressing the right arrow key does select the row. It seems the leftmost table cell has 'focus' somehow but the row isn't selected.

master (2.3) 2018-12-15

Tags: easy library
ronso0 (ronso0)
description: updated
Revision history for this message
Daniel Schürmann (daschuer) wrote :

I can confirm the issue with Mixxx 1.2.5 as well.

Changed in mixxx:
status: New → Confirmed
importance: Undecided → Low
tags: added: easy
Revision history for this message
ronso0 (ronso0) wrote :

@daschuer What easy solution do you propose?

In wtracktableview.cpp I'd like to select a single row automatically (in any feature/track model), but how would I retrieve the number of rows?

Revision history for this message
Daniel Schürmann (daschuer) wrote :

I do not have a recipe for an easy fix.

I think I would start using gdb and investigate the call stack that is used when more tracks are there and a s new one is highlighted. Than I would use a one track table and repeat the test with a braekpoint a bit down in the call tree. Are you able to single step though the code?

Maybe you can than find out, why it does not work with one track and fix it finally.

Revision history for this message
ronso0 (ronso0) wrote :

So far I used gdb only to create crash reports.
I'll see if I can wrap my head around that, but I'm afraid this won't happen soon as there are other issues more itching and more likely for me to solve them.

Revision history for this message
ronso0 (ronso0) wrote :

So far I've found out that the first table row is always soemhow focused but not selected/highlighted.

In wtracktableview.cpp I can manually select the first row if there's only one, but that would only work for [Playlist],MoveSelection controls, not for Up/Down key presses (real or emulated in librarycontrol.cpp). The issue seems to be in qabstractitemview or qtableview respectively.

ronso0 (ronso0)
summary: - can't focus tracks table item if there is only one
+ controllers can't focus tracks table item if there is only one
ronso0 (ronso0)
Changed in mixxx:
assignee: nobody → ronso0 (ronso0)
status: Confirmed → In Progress
Changed in mixxx:
milestone: none → 2.3.0
ronso0 (ronso0)
Changed in mixxx:
assignee: ronso0 (ronso0) → nobody
Revision history for this message
ronso0 (ronso0) wrote :
Changed in mixxx:
assignee: nobody → ronso0 (ronso0)
Revision history for this message
ronso0 (ronso0) wrote :

#3049 that enforces a selection on FocusIn events of WLibraryTableView:
no previously focused item: select first
previously focused item, but no selection: select previous item

Revision history for this message
ronso0 (ronso0) wrote :
Changed in mixxx:
status: In Progress → Fix Committed
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/9548

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.