Commit a05d01fc authored by Michael Pyne's avatar Michael Pyne

* Fix a problem where you could never delete items from the Collection List,

  as they would reappear the next time you start JuK.

svn path=/trunk/kdemultimedia/juk/; revision=313117
parent b9165f7b
......@@ -88,10 +88,23 @@ void CollectionList::clear()
"all of your playlists. Are you sure you want to continue?\n\n"
"Note, however, that if the directory that these files are in is in "
"your \"scan on startup\" list, they will be readded on startup."));
if(result == KMessageBox::Yes)
Playlist::clear();
emit signalCollectionChanged();
if(result == KMessageBox::Yes) {
// We're taking code from Playlist::clear() here.
PlaylistItemList l = selectedItems();
if (l.isEmpty())
l = items();
// We need to remove the items from the Cache. Rather
// ugly hack, unfortunately.
PlaylistItemList::Iterator it = l.begin();
for ( ; it != l.end(); ++it)
Cache::instance()->remove((*it)->file());
// Now clear the items like normal
clearItems(l);
emit signalCollectionChanged();
}
}
void CollectionList::slotCheckCache()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment