diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-08-24 08:37:46 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-08-24 08:37:46 +0000 |
commit | 3a072cc8ff3b6aad3951f19c23391c98f4e953fd (patch) | |
tree | ef2987db49787570145dae543df0cdb6632dc491 /Source/SPTableContent.m | |
parent | 95994f8a98856a0e5c7c56b490e0e1e227982e49 (diff) | |
download | sequelpro-3a072cc8ff3b6aad3951f19c23391c98f4e953fd.tar.gz sequelpro-3a072cc8ff3b6aad3951f19c23391c98f4e953fd.tar.bz2 sequelpro-3a072cc8ff3b6aad3951f19c23391c98f4e953fd.zip |
• Content Window cell editing
- If enum field is edited RETURN selects the new value instead of saving the entire row
Diffstat (limited to 'Source/SPTableContent.m')
-rw-r--r-- | Source/SPTableContent.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 031c05e7..1194be97 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -3833,6 +3833,10 @@ // Trap enter key else if ( [textView methodForSelector:command] == [textView methodForSelector:@selector(insertNewline:)] ) { + // If enum field is edited RETURN selects the new value instead of saving the entire row + NSString *fieldType = [[tableDataInstance columnWithName:[[NSArrayObjectAtIndex([tableContentView tableColumns], column) headerCell] stringValue]] objectForKey:@"typegrouping"]; + if([fieldType isEqualToString:@"enum"]) + return YES; [[control window] makeFirstResponder:control]; if([tablesListInstance tableType] != SPTableTypeView) @@ -3845,6 +3849,7 @@ else if ( [textView methodForSelector:command] == [textView methodForSelector:@selector(moveDown:)] ) { + // If enum field is edited ARROW key navigates through the popup list NSString *fieldType = [[tableDataInstance columnWithName:[[NSArrayObjectAtIndex([tableContentView tableColumns], column) headerCell] stringValue]] objectForKey:@"typegrouping"]; if([fieldType isEqualToString:@"enum"]) return NO; @@ -3868,6 +3873,7 @@ else if ( [textView methodForSelector:command] == [textView methodForSelector:@selector(moveUp:)] ) { + // If enum field is edited ARROW key navigates through the popup list NSString *fieldType = [[tableDataInstance columnWithName:[[NSArrayObjectAtIndex([tableContentView tableColumns], column) headerCell] stringValue]] objectForKey:@"typegrouping"]; if([fieldType isEqualToString:@"enum"]) return NO; |