mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-10 02:40:59 +00:00
Fixed: the CPArrayController code to remove out of bounds selections failed to remove the last selected item if the new arrangedObjects array was empty.
This commit is contained in:
1 parent
8a8af0e4a9
commit
15be647c16
1 file changed
+1
-1
@@ -310,7 +310,7 @@
|
||||
{
|
||||
var objectsCount = [[self arrangedObjects] count];
|
||||
// Remove out of bounds indexes.
|
||||
[indexes removeIndexesInRange:CPMakeRange(objectsCount, [indexes lastIndex])];
|
||||
[indexes removeIndexesInRange:CPMakeRange(objectsCount, [indexes lastIndex]+1)];
|
||||
// When avoiding empty selection and the deleted selection was at the bottom, select the last item.
|
||||
if(![indexes count] && _avoidsEmptySelection && objectsCount)
|
||||
indexes = [CPIndexSet indexSetWithIndex:objectsCount-1];
|
||||
|
||||
Reference in new issue
Block a user