Undoing this change since it is no longer necessary due to an alternative solution implemented by Ross Boucher. Revert "Merge commit 'c17a3533ecae63d479b285b23ac3a490ebe8bd3c'"

This reverts commit 039f2ce449, reversing
changes made to 494f39dd86.
This commit is contained in:
Alexander Ljungberg committed 2010-08-13 14:39:27 -04:00
1 parent bcb22c7e46
commit 4c0057e66a
1 file changed
+3 -10
+3 -10
View File
@@ -407,23 +407,16 @@
if (_filterPredicate === nil || [_filterPredicate evaluateWithObject:object])
{
var position;
if ([_sortDescriptors count] > 0)
position = [_arrangedObjects insertObject:object inArraySortedByDescriptors:_sortDescriptors];
else
{
[_arrangedObjects addObject:object];
position = [_arrangedObjects count] - 1;
}
var pos = [_arrangedObjects insertObject:object inArraySortedByDescriptors:_sortDescriptors];
if (_selectsInsertedObjects)
{
[self setSelectionIndex:position];
[self setSelectionIndex:pos];
}
else
{
[self willChangeValueForKey:@"selectionIndexes"];
[_selectionIndexes shiftIndexesStartingAtIndex:position by:1];
[_selectionIndexes shiftIndexesStartingAtIndex:pos by:1];
[self didChangeValueForKey:@"selectionIndexes"];
}
}