1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-29 19:11:18 +01:00

Don't ask about closing the playlist if it's empty

Fixes issue 3827.
This commit is contained in:
Mateusz Kowalczyk 2013-08-28 21:38:17 +02:00 committed by Arnaud Bienner
parent dc25bdd282
commit aa347d0a57

View File

@ -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"));