aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionControllerDelegate.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-06-03 18:45:48 +0000
committerrowanbeentje <rowan@beent.je>2012-06-03 18:45:48 +0000
commitb5934d004ce7e73e45da1b4de823e8092843ef9b (patch)
treeaad1effe3227cedeea01b23fd82aad195087c7a6 /Source/SPConnectionControllerDelegate.m
parent74605c185982d0f1882b8acbdd2d1703aadc1c40 (diff)
downloadsequelpro-b5934d004ce7e73e45da1b4de823e8092843ef9b.tar.gz
sequelpro-b5934d004ce7e73e45da1b4de823e8092843ef9b.tar.bz2
sequelpro-b5934d004ce7e73e45da1b4de823e8092843ef9b.zip
- Remove delayed favourite selection call on tab setup. This fixes detail reset issues causing Issue #1362 and Issue #1338, possibly others.
- Clean up duplicate code setting and resetting connection interface state, ensuring one code path used by all
Diffstat (limited to 'Source/SPConnectionControllerDelegate.m')
-rw-r--r--Source/SPConnectionControllerDelegate.m12
1 files changed, 5 insertions, 7 deletions
diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m
index bbdf7624..567f8e87 100644
--- a/Source/SPConnectionControllerDelegate.m
+++ b/Source/SPConnectionControllerDelegate.m
@@ -45,7 +45,6 @@ static NSString *SPDatabaseImage = @"database-small";
- (NSString *)_stripInvalidCharactersFromString:(NSString *)subject;
-- (void)_resetConnectionDetailsInputInterface;
- (void)_setNodeIsExpanded:(BOOL)expanded fromNotification:(NSNotification *)notification;
@end
@@ -85,17 +84,15 @@ static NSString *SPDatabaseImage = @"database-small";
SPTreeNode *node = [self selectedFavoriteNode];
- if (![node isGroup]) {
- [self updateFavoriteSelection:self];
-
+ [self updateFavoriteSelection:self];
+
+ if (![node isGroup]) {
[addToFavoritesButton setEnabled:NO];
-
+
favoriteNameFieldWasTouched = YES;
}
else {
[addToFavoritesButton setEnabled:YES];
-
- [self _resetConnectionDetailsInputInterface];
}
[connectionResizeContainer setHidden:NO];
@@ -415,6 +412,7 @@ static NSString *SPDatabaseImage = @"database-small";
*/
- (BOOL)control:(NSControl *)control textShouldEndEditing:(NSText *)fieldEditor
{
+
// Request a password refresh to keep keychain references in sync with favorites, but only if a favorite
// is selected, meaning we're editing an existing one, not a new one.
if (((id)control != (id)favoritesOutlineView) && ([self selectedFavoriteNode])) {