aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/TablesList.m13
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/TablesList.m b/Source/TablesList.m
index 2866bd3c..0029aac1 100644
--- a/Source/TablesList.m
+++ b/Source/TablesList.m
@@ -807,16 +807,27 @@
}
}
+/*
+ * Controls the NSTextField's press RETURN event of Add/Rename/Duplicate sheets
+ */
- (void)controlTextDidEndEditing:(NSNotification *)notification
{
id object = [notification object];
+ // Only RETURN/ENTER will be recognized for Add/Rename/Duplicate sheets to
+ // activate the Add/Rename/Duplicate buttons
+ if([[[notification userInfo] objectForKey:@"NSTextMovement"] intValue] != 0)
+ return;
+
if (object == tableRenameField) {
[renameTableButton performClick:object];
}
- if (object == tableNameField) {
+ else if (object == tableNameField) {
[addTableButton performClick:object];
}
+ else if (object == copyTableNameField) {
+ [copyTableButton performClick:object];
+ }
}
#pragma mark Getter methods