aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionController.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-05-27 22:33:26 +0000
committerrowanbeentje <rowan@beent.je>2012-05-27 22:33:26 +0000
commit1f0dde0452519496a3d361ad6ddb38731c350a7e (patch)
tree94a37bd6d035ebf0c3e6956ba954fdf2466d24c6 /Source/SPConnectionController.m
parent03f6c875ed6c240e9af2916ce92584ac6624ef87 (diff)
downloadsequelpro-1f0dde0452519496a3d361ad6ddb38731c350a7e.tar.gz
sequelpro-1f0dde0452519496a3d361ad6ddb38731c350a7e.tar.bz2
sequelpro-1f0dde0452519496a3d361ad6ddb38731c350a7e.zip
Improve connection handling and editing:
- Fix long-standing intermittent crashes caused by connection errors after SSH tunnels were established - Fix edits causing keychain -25299 errors (Issue #1340) - Allow changes of favourite type to be saved rather than disassociating the edit from the selection - Fix the favourites view scrolling to the top when there's no selection and connection details are being edited - Fix some issues with automatic naming of connections on connection type change
Diffstat (limited to 'Source/SPConnectionController.m')
-rw-r--r--Source/SPConnectionController.m7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index 212df1da..68d7bb16 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -468,7 +468,6 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2,
*/
- (void)updateFavoriteSelection:(id)sender
{
- automaticFavoriteSelection = YES;
// Clear the keychain referral items as appropriate
if (connectionKeychainID) [connectionKeychainID release], connectionKeychainID = nil;
@@ -1218,7 +1217,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2,
}
// Update the name for newly added favorites if not already touched by the user, by triggering a KVO update
- if (!favoriteNameFieldWasTouched) {
+ if (![[self name] length]) {
[self setName:[NSString stringWithFormat:@"%@@%@",
([favorite objectForKey:SPFavoriteUserKey]) ? [favorite objectForKey:SPFavoriteUserKey] : @"",
((previousType == SPSocketConnection) ? @"localhost" :
@@ -1290,6 +1289,10 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2,
*/
- (void)_scrollToSelectedNode
{
+
+ // Don't scroll if no node is currently selected
+ if ([favoritesOutlineView selectedRow] == -1) return;
+
[favoritesOutlineView scrollRowToVisible:[favoritesOutlineView selectedRow]];
}