Fixed DND playlist bug where dragging between the playlist could cause a crash.
parent
2b00672b45
commit
4dc7d7199e
|
@ -111,8 +111,10 @@ NSString *MovedRowsType = @"MOVED_ROWS_TYPE";
|
|||
insertIndex -= 1;
|
||||
}
|
||||
object = [objects objectAtIndex:removeIndex];
|
||||
[object retain];
|
||||
[self removeObjectAtArrangedObjectIndex:removeIndex];
|
||||
[self insertObject:object atArrangedObjectIndex:insertIndex];
|
||||
[object release];
|
||||
|
||||
index = [indexSet indexLessThanIndex:index];
|
||||
}
|
||||
|
|
|
@ -170,7 +170,9 @@
|
|||
if ([info draggingSource] == tableView)
|
||||
{
|
||||
//DNDArrayController handles moving...still need to update the uhm...indices
|
||||
NSLog(@"Archive stuff");
|
||||
NSArray *rows = [NSKeyedUnarchiver unarchiveObjectWithData:[[info draggingPasteboard] dataForType: MovedRowsType]];
|
||||
NSLog(@"Whatever");
|
||||
NSIndexSet *indexSet = [self indexSetFromRows:rows];
|
||||
int firstIndex = [indexSet firstIndex];
|
||||
if (firstIndex > row)
|
||||
|
|
Loading…
Reference in New Issue