mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-09 18:30:59 +00:00
Fixed: if CPArrayController setPreserveSelection was off and a selected item disappeared, an invalid selection state could occur. The error was caused by a slightly overeager early-out optimisation in __setSelectionIndexes.
This commit is contained in:
1 parent
c489909542
commit
e704d42adb
2 files changed
+22
-3
No files matched your search
@@ -363,9 +363,6 @@
|
||||
if (!indexes)
|
||||
indexes = [CPIndexSet indexSet];
|
||||
|
||||
if ([_selectionIndexes isEqualToIndexSet:indexes])
|
||||
return NO;
|
||||
|
||||
if (![indexes count])
|
||||
{
|
||||
if(_avoidsEmptySelection && [[self arrangedObjects] count])
|
||||
@@ -381,6 +378,9 @@
|
||||
indexes = [CPIndexSet indexSetWithIndex:objectsCount-1];
|
||||
}
|
||||
|
||||
if ([_selectionIndexes isEqualToIndexSet:indexes])
|
||||
return NO;
|
||||
|
||||
_selectionIndexes = [indexes copy];
|
||||
|
||||
// Push back the new selection to the model for selectionIndexes if we have one.
|
||||
|
||||
Reference in new issue
Block a user