Skip to content

Commit

Permalink
Playlists: keep previous sidebar selection (other feature or root item)
Browse files Browse the repository at this point in the history
  • Loading branch information
ronso0 committed May 21, 2023
1 parent 1cd84a7 commit ed6a4b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/library/trackset/playlistfeature.cpp
Expand Up @@ -296,7 +296,7 @@ void PlaylistFeature::slotPlaylistTableChanged(int playlistId) {

clearChildModel();
QModelIndex newIndex = constructChildModel(selectedPlaylistId);
if (newIndex.isValid()) {
if (selectedPlaylistId != kInvalidPlaylistId && newIndex.isValid()) {
// If a child index was selected and we got a new valid index select that.
// Else (root item was selected or for some reason no index could be created)
// there's nothing to do: either no child was selected earlier, or the root
Expand Down

0 comments on commit ed6a4b9

Please sign in to comment.