if there is no selected items, treat the current one as selected

This commit is contained in:
Andrzej Rybczak
2009-11-26 22:01:27 +01:00
parent 03129784d4
commit 5aaafba545
7 changed files with 17 additions and 11 deletions

View File

@@ -419,10 +419,10 @@ void MediaLibrary::GetSelectedSongs(MPD::SongList &v)
{
std::vector<size_t> selected;
Songs->GetSelected(selected);
if (selected.empty())
selected.push_back(Songs->Choice());
for (std::vector<size_t>::const_iterator it = selected.begin(); it != selected.end(); ++it)
{
v.push_back(new MPD::Song(Songs->at(*it)));
}
}
void MediaLibrary::ApplyFilter(const std::string &s)