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.
This commit is contained in:
Andrzej Rybczak
2010-05-18 17:55:56 +02:00
parent 1154a95143
commit 15a89a6d41

View File

@@ -357,8 +357,11 @@ void MediaLibrary::SpacePressed()
} }
else if (w == Albums) else if (w == Albums)
{ {
Albums->Select(Albums->Choice(), !Albums->isSelected()); if (Albums->Current().Year != AllTracksMarker)
Songs->Clear(); {
Albums->Select(Albums->Choice(), !Albums->isSelected());
Songs->Clear();
}
} }
else if (w == Songs) else if (w == Songs)
Songs->Select(Songs->Choice(), !Songs->isSelected()); 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 (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); std::string tag_type = IntoStr(Config.media_lib_primary_tag);
ToLower(tag_type); ToLower(tag_type);