diff options
author | rowanbeentje <rowan@beent.je> | 2010-09-16 01:00:12 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2010-09-16 01:00:12 +0000 |
commit | e6497aafda5ecb92e1fe18f5e23999c2babec296 (patch) | |
tree | 12effaf3c01389084ba6ba25c2ec1480b662ef9f /Source/SPCopyTable.m | |
parent | cbb150b07fcb3a96db460a22c4eb5280d8bf9e08 (diff) | |
download | sequelpro-e6497aafda5ecb92e1fe18f5e23999c2babec296.tar.gz sequelpro-e6497aafda5ecb92e1fe18f5e23999c2babec296.tar.bz2 sequelpro-e6497aafda5ecb92e1fe18f5e23999c2babec296.zip |
- Consolidate structure and content row editing cancellation code into a single function in each class
- Tweak NSTableView subclasses to catch presses of the Escape key and ask the class to abort row editing. This makes Esc key behaviour much more consistent, and allows cancelling/reverting edits made via the mouse (eg checkboxes, dropdowns, enums), or after the cell editing has finished but the row is still selected.
- Remove debug
- Update localisable strings
Diffstat (limited to 'Source/SPCopyTable.m')
-rw-r--r-- | Source/SPCopyTable.m | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m index 962557f1..faf1b231 100644 --- a/Source/SPCopyTable.m +++ b/Source/SPCopyTable.m @@ -739,6 +739,13 @@ NSInteger MENU_EDIT_COPY_AS_SQL = 2003; return; } + // Check if ESCAPE is hit and use it to cancel row editing if supported + else if ([theEvent keyCode] == 53 && [[self delegate] respondsToSelector:@selector(cancelRowEditing)]) + { + if ([[self delegate] cancelRowEditing]) return; + } + + [super keyDown:theEvent]; } |