diff options
author | avenjamin <avenjamin@gmail.com> | 2009-05-13 03:24:20 +0000 |
---|---|---|
committer | avenjamin <avenjamin@gmail.com> | 2009-05-13 03:24:20 +0000 |
commit | c468b8111a15b89e4801eb89dd217392e0d4a347 (patch) | |
tree | 167551d4a81c3eabebe6540cf19626d63bb80f20 /Source | |
parent | 12b84cb69a904fb6ea714ab6d4b0b885f4d54436 (diff) | |
download | sequelpro-c468b8111a15b89e4801eb89dd217392e0d4a347.tar.gz sequelpro-c468b8111a15b89e4801eb89dd217392e0d4a347.tar.bz2 sequelpro-c468b8111a15b89e4801eb89dd217392e0d4a347.zip |
Fixes issues #255 and #257
- Favorites list in connection sheet was moving bottom grey border when scrolling. (#255)
- Missing keys for a favorite item were return NULL values causing field values from previously selected favorite to remain. (#257)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/TableDocument.m | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/TableDocument.m b/Source/TableDocument.m index 6a769996..3c02e687 100644 --- a/Source/TableDocument.m +++ b/Source/TableDocument.m @@ -390,13 +390,13 @@ NSString *TableDocumentFavoritesControllerSelectionIndexDidChange = @"TableDocum if (![self selectedFavorite]) return; - [nameField setStringValue:[self valueForKeyPath:@"selectedFavorite.name"]]; - [hostField setStringValue:[self valueForKeyPath:@"selectedFavorite.host"]]; - [socketField setStringValue:[self valueForKeyPath:@"selectedFavorite.socket"]]; - [userField setStringValue:[self valueForKeyPath:@"selectedFavorite.user"]]; - [portField setStringValue:[self valueForKeyPath:@"selectedFavorite.port"]]; - [databaseField setStringValue:[self valueForKeyPath:@"selectedFavorite.database"]]; - [passwordField setStringValue:[self selectedFavoritePassword]]; + [nameField setStringValue:([self valueForKeyPath:@"selectedFavorite.name"] ? [self valueForKeyPath:@"selectedFavorite.name"] : @"")]; + [hostField setStringValue:([self valueForKeyPath:@"selectedFavorite.host"] ? [self valueForKeyPath:@"selectedFavorite.host"] : @"")]; + [userField setStringValue:([self valueForKeyPath:@"selectedFavorite.user"] ? [self valueForKeyPath:@"selectedFavorite.user"] : @"")]; + [passwordField setStringValue:([self selectedFavoritePassword] ? [self selectedFavoritePassword] : @"")]; + [databaseField setStringValue:([self valueForKeyPath:@"selectedFavorite.database"] ? [self valueForKeyPath:@"selectedFavorite.database"] : @"")]; + [socketField setStringValue:([self valueForKeyPath:@"selectedFavorite.socket"] ? [self valueForKeyPath:@"selectedFavorite.socket"] : @"")]; + [portField setStringValue:([self valueForKeyPath:@"selectedFavorite.port"] ? [self valueForKeyPath:@"selectedFavorite.port"] : @"")]; [prefs setInteger:[favoritesController selectionIndex] forKey:@"LastFavoriteIndex"]; } |