diff options
Diffstat (limited to 'Source/TableDocument.m')
-rw-r--r-- | Source/TableDocument.m | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 10ef7dca..6fae3a0b 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -1515,6 +1515,22 @@ invoked when query gave an error [self showErrorInConsole:[NSString stringWithFormat:@"/* ERROR %@ */ %@;\n", currentTime, error]]; } +#pragma mark Connection sheet delegate methods + +/** + * When a favorite is selected, and the connection details are edited, deselect the favorite; + * this is clearer and also prevents a failed connection from being repopulated with the + * favorite's details instead of the last used details. + * This method allows the password to be changed without altering the selection. + */ +- (void) controlTextDidChange:(NSNotification *)aNotification +{ + if ([aNotification object] == hostField || [aNotification object] == userField || [aNotification object] == databaseField + || [aNotification object] == socketField || [aNotification object] == portField) { + [favoritesController setSelectionIndexes:[NSIndexSet indexSet]]; + } +} + #pragma mark SplitView delegate methods /** |