From ec5f271f17b9e34c63ed40bdddebca187bcb80f9 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Wed, 5 Sep 2012 01:08:18 +0200 Subject: [PATCH] playlist editor: do not display "Playlist is empty" message --- src/playlist_editor.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/playlist_editor.cpp b/src/playlist_editor.cpp index 141be16f..47312c83 100644 --- a/src/playlist_editor.cpp +++ b/src/playlist_editor.cpp @@ -177,16 +177,13 @@ void PlaylistEditor::Update() if (Config.titles_visibility) { title = "Playlist content"; - if (list.size() > 0) - { - title += " ("; - title += unsignedLongIntTo::apply(list.size()); - title += " item"; - if (list.size() == 1) - title += ")"; - else - title += "s)"; - } + title += " ("; + title += unsignedLongIntTo::apply(list.size()); + title += " item"; + if (list.size() == 1) + title += ")"; + else + title += "s)"; title.resize(Content->getWidth()); } Content->setTitle(title); @@ -201,10 +198,10 @@ void PlaylistEditor::Update() w = Playlists; } - if (Content->reallyEmpty()) + if (Playlists->empty() && Content->reallyEmpty()) { - *Content << NC::XY(0, 0) << "Playlist is empty."; - Content->Window::refresh(); + Content->Window::clear(); + Content->Window::display(); } }