v0.1.5: sidebar playlist tree auto-scrolls when dragging near its edges

This commit is contained in:
2026-07-17 13:05:52 -04:00
parent 663d5e5a08
commit 2820e6df8a
4 changed files with 164 additions and 7 deletions

View File

@ -3,6 +3,25 @@
Legend: `[ ]` todo · `[~]` in progress · `[x]` done.
When a round closes, move its finished items to `tasks-done.md`.
## Round 24 — sidebar drag auto-scroll (v0.1.5)
Tests in `tests/test_round24.py`. Fix round → patch bump **0.1.5**.
Dragging a playlist near the top/bottom edge of the sidebar tree scrolled
nothing: `PlaylistTree.dragMoveEvent` fully overrides the base implementation,
so Qt's built-in autoscroll (in `QAbstractItemView.dragMoveEvent`) never ran —
the same root cause Round 13 fixed in the track table. Ported that machinery
(`autoscroll_direction` shared from `track_table`, 40 ms timer, one unit per
tick) into `PlaylistTree`. Playlist moves keep the scroll live at the edge
even over non-folder rows (the tree always accepts an internal move
somewhere); track drags gate on hovering a real playlist row, matching the
drop-target highlight, and the highlight re-tracks the row under a held-still
cursor as it scrolls.
- [x] `lintunes/gui/sidebar.py``_update_autoscroll` / `_autoscroll_tick` /
`_stop_autoscroll` wired into `dragMoveEvent`, `dragLeaveEvent`,
`dropEvent`.
## Round 23 — playback-control provenance log (v0.1.4)
Tests in `tests/test_round23.py`. Diagnostic round → patch bump **0.1.4**.