aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionController.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-05-10 23:58:12 +0000
committerrowanbeentje <rowan@beent.je>2012-05-10 23:58:12 +0000
commitddbb9327e4eff680e367df06b1852b93d469f970 (patch)
treeaf934accfa7cf65cc858a72fb528ddde3971d7e6 /Source/SPConnectionController.m
parent388a71f4bcb6d89bb0d39bfd3a637e69163fc9e1 (diff)
downloadsequelpro-ddbb9327e4eff680e367df06b1852b93d469f970.tar.gz
sequelpro-ddbb9327e4eff680e367df06b1852b93d469f970.tar.bz2
sequelpro-ddbb9327e4eff680e367df06b1852b93d469f970.zip
- Iterate over group nodes backwards when removing them during sorting, fixing excpetions if sorting multiple group nodes in a tree
Diffstat (limited to 'Source/SPConnectionController.m')
-rw-r--r--Source/SPConnectionController.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index 9400f451..cc1daeb7 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -1160,13 +1160,13 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2,
}
}
- NSUInteger i = [indexes firstIndex];
+ NSUInteger i = [indexes lastIndex];
while (i != NSNotFound)
{
[nodes removeObjectAtIndex:i];
- i = [indexes indexGreaterThanIndex:i];
+ i = [indexes indexLessThanIndex:i];
}
[indexes release];