mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-13 06:01:28 +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:
@@ -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