Fixed undo for clear.

CQTexperiment
vspader 2008-02-10 19:46:45 +00:00
parent e2b40fe1a3
commit a24149dc10
2 changed files with 3 additions and 10 deletions

View File

@ -1,4 +1 @@
* Undo does not work for Playlist -> Clear
* UndoManager starts dropping old undo entries after 25 undos
on the stack. Memleak?
Undo is broken badly when filtering.

View File

@ -517,13 +517,9 @@
- (IBAction)clear:(id)sender
{
[currentEntry setIndex:[NSNumber numberWithInt:-1]];
[self setFilterPredicate:nil];
[self removeObjects:[self content]];
[self updateTotalTime];
if (shuffle == YES)
[self resetShuffleList];
[self removeObjectsAtArrangedObjectIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [[self arrangedObjects] count])]];
}
- (IBAction)clearFilterPredicate:(id)sender