aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-08-24 08:37:46 +0000
committerBibiko <bibiko@eva.mpg.de>2010-08-24 08:37:46 +0000
commit3a072cc8ff3b6aad3951f19c23391c98f4e953fd (patch)
treeef2987db49787570145dae543df0cdb6632dc491
parent95994f8a98856a0e5c7c56b490e0e1e227982e49 (diff)
downloadsequelpro-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
-rw-r--r--Source/SPTableContent.m6
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;