From aa347d0a57fc3a10653895a70b15c26b96e47774 Mon Sep 17 00:00:00 2001 From: Mateusz Kowalczyk Date: Wed, 28 Aug 2013 21:38:17 +0200 Subject: [PATCH] Don't ask about closing the playlist if it's empty Fixes issue 3827. --- src/playlist/playlisttabbar.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/playlist/playlisttabbar.cpp b/src/playlist/playlisttabbar.cpp index 16d60e17e..48c16698c 100644 --- a/src/playlist/playlisttabbar.cpp +++ b/src/playlist/playlisttabbar.cpp @@ -167,7 +167,8 @@ void PlaylistTabBar::Close() { const bool ask_for_delete = s.value("warn_close_playlist", true).toBool(); - if (ask_for_delete && !manager_->IsPlaylistFavorite(playlist_id)) { + if (ask_for_delete && !manager_->IsPlaylistFavorite(playlist_id) && + !manager_->playlist(playlist_id)->GetAllSongs().empty()) { QMessageBox confirmation_box; confirmation_box.setWindowIcon(QIcon(":/icon.png")); confirmation_box.setWindowTitle(tr("Remove playlist"));