aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-11-04 00:11:47 +0000
committerrowanbeentje <rowan@beent.je>2010-11-04 00:11:47 +0000
commitefc5a0e98e86838300426606e8e649bdb96f68f6 (patch)
tree59530114bf51b94baa2336f9155a2be7a4fcb93d
parente185e73e733edc9357e3642a4bb1fc9b9f2c0748 (diff)
downloadsequelpro-efc5a0e98e86838300426606e8e649bdb96f68f6.tar.gz
sequelpro-efc5a0e98e86838300426606e8e649bdb96f68f6.tar.bz2
sequelpro-efc5a0e98e86838300426606e8e649bdb96f68f6.zip
- Fix problems updating the default favourite pop following the preference changes - this addresses http://spbug.com/l/1774
- Fix reselection of a newly reordered favourite - When reordering favourites downwards, move them to the correct position instead of one position too low
-rw-r--r--Source/SPConnectionController.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index 11339ace..d356bc89 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -1051,7 +1051,7 @@
[favoritesTable selectRowIndexes:[NSIndexSet indexSetWithIndex:[favorites count]-1] byExtendingSelection:NO];
[favoritesTable scrollRowToVisible:[favoritesTable selectedRow]];
- [[[NSApp delegate] preferenceController] updateDefaultFavoritePopup];
+ [[[[NSApp delegate] preferenceController] generalPreferencePane] updateDefaultFavoritePopup];
}
/**
@@ -1120,24 +1120,24 @@
}
NSMutableDictionary *draggedFavorite = [favorites objectAtIndex:dragRow];
[favorites removeObjectAtIndex:dragRow];
- if (row > [favorites count])
+ if (row > dragRow)
{
row--;
}
[favorites insertObject:draggedFavorite atIndex:row];
[aTableView reloadData];
- [aTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
// reset the prefs with the new order
NSMutableArray *reorderedFavorites = [[NSMutableArray alloc] initWithArray:favorites];
[reorderedFavorites removeObjectAtIndex:0];
[prefs setObject:reorderedFavorites forKey:SPFavorites];
- [[[NSApp delegate] preferenceController] updateDefaultFavoritePopup];
+ [[[[NSApp delegate] preferenceController] generalPreferencePane] updateDefaultFavoritePopup];
[reorderedFavorites release];
[self updateFavorites];
+ [aTableView selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
acceptedDrop = YES;