PlaylistView: Don't automatically scroll on dynamic playlists

Fixes #1427
This commit is contained in:
Jonas Kvinge
2025-12-14 04:55:20 +01:00
parent e2907f6051
commit 3867932e1e

View File

@@ -1371,8 +1371,9 @@ void PlaylistView::rowsInserted(const QModelIndex &parent, const int start, cons
QTreeView::rowsInserted(parent, start, end);
if (at_end) {
if (at_end && playlist_ && !playlist_->is_dynamic()) {
// If the rows were inserted at the end of the playlist then let's scroll the view so the user can see.
// However, don't do this for dynamic playlists as they continuously add items at the end, and we want to keep the current playing track visible instead.
scrollTo(model()->index(start, 0, parent), QAbstractItemView::PositionAtTop);
}