diff --git a/NEWS b/NEWS index eaa766b8..02e5efa2 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ ncmpcpp-0.8.1 (????-??-??) * Setting 'colors_enabled' to 'no' no longer results in a crash. * Using '--quiet' command line argument no longer results in a crash. * If songs in media library have no track numbers, sort them by name. +* Fixed a situation in which songs added to playlist from media library or playlist editor screens would not be immediately marked as such. ncmpcpp-0.8 (2017-05-21) * Configuration variable 'execute_on_player_state_change' was added. diff --git a/src/status.cpp b/src/status.cpp index 85246a17..cd1850ca 100644 --- a/src/status.cpp +++ b/src/status.cpp @@ -439,6 +439,17 @@ void Status::Changes::playlist(unsigned previous_version) myPlaylist->reloadTotalLength(); myPlaylist->reloadRemaining(); + + // When we're in multi-column screens, it might happen that songs visible on + // the screen are added, but they will not be immediately marked as such + // because the window that contains them is not the active one at the moment, + // so we need to refresh them manually. + if (isVisible(myLibrary) + && !myLibrary->isActiveWindow(myLibrary->Songs)) + myLibrary->Songs.refresh(); + if (isVisible(myPlaylistEditor) + && !myPlaylistEditor->isActiveWindow(myPlaylistEditor->Content)) + myPlaylistEditor->Content.refresh(); } void Status::Changes::storedPlaylists()