From 15a89a6d415191d998198e997cf4fc5b93c33985 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Tue, 18 May 2010 17:55:56 +0200 Subject: [PATCH] make a few exceptions for "all tracks" option since it's not real album users shouldn't be allowed to select it since adding selected item "all tracks" does nothing. editing is allowed since one may want to set album for all tracks at once. adding with space should display information about adding all tracks of specific tag that is in left column since standard message will display 'adding songs from album ""', which is not that what we want. --- src/media_library.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/media_library.cpp b/src/media_library.cpp index 59369be4..f2f0c4af 100644 --- a/src/media_library.cpp +++ b/src/media_library.cpp @@ -357,8 +357,11 @@ void MediaLibrary::SpacePressed() } else if (w == Albums) { - Albums->Select(Albums->Choice(), !Albums->isSelected()); - Songs->Clear(); + if (Albums->Current().Year != AllTracksMarker) + { + Albums->Select(Albums->Choice(), !Albums->isSelected()); + Songs->Clear(); + } } else if (w == Songs) Songs->Select(Songs->Choice(), !Songs->isSelected()); @@ -687,7 +690,8 @@ void MediaLibrary::AddToPlaylist(bool add_n_play) if (myPlaylist->Add(list, add_n_play)) { - if (!Artists->Empty() && w == Artists) + if ((!Artists->Empty() && w == Artists) + || (w == Albums && Albums->Current().Year == AllTracksMarker)) { std::string tag_type = IntoStr(Config.media_lib_primary_tag); ToLower(tag_type);