Mark songs as added to playlist immediately (media library / playlist editor)

This commit is contained in:
Andrzej Rybczak
2017-08-31 10:19:13 +02:00
parent def5c46225
commit c340a6ba9a
2 changed files with 12 additions and 0 deletions

1
NEWS
View File

@@ -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.

View File

@@ -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()