Fixed shifting of selected indexes when removing an object. You don't want to shift the index removed, just those above it

This commit is contained in:
Mike Shields 2010-09-17 14:47:42 -04:00
parent 8c29c7f4ed
commit e95ac5e170

View File

@ -384,7 +384,7 @@ triggerChangeNotificationsForDependentKey:@"selectionIndex"];
[self didChangeValueForKey:@"arrangedObjects"];
[self willChangeValueForKey:@"selectionIndexes"];
[_selectionIndexes shiftIndexesStartingAtIndex:pos by:-1];
[_selectionIndexes shiftIndexesStartingAtIndex:pos+1 by:-1];
[self didChangeValueForKey:@"selectionIndexes"];
}
}