ListView: fix track session handling

Fix various track session handling related bugs like unexpected
selected item change when mouse button was not pressed inside list view
or not currently pressed at all.

Use `fTrack->is_active` to indicate that track session is active.

Remove `fTrack->buttons` because exact mouse button is never checked in
code.

Remove some redundant conditions.

Remove now not needed workaround in `BColorListView::MouseUp`.

Change-Id: Ic4ac846019bd71af008c936dd8d7d265326cba9a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10968
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
This commit is contained in:
X512
2026-05-11 16:55:07 +00:00
committed by Adrien Destugues
parent 8e3a572216
commit de59fdde33
3 changed files with 16 additions and 23 deletions
-1
View File
@@ -24,7 +24,6 @@ public:
virtual ~BColorListView();
virtual bool InitiateDrag(BPoint where, int32 index, bool wasSelected);
virtual void MouseUp(BPoint where);
};