From 418ab5876c0a278ed0e2b86d5215739f95bc6add Mon Sep 17 00:00:00 2001 From: Bibiko Date: Wed, 15 Dec 2010 21:14:41 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20issue=20to=20be=20able=20to=20cance?= =?UTF-8?q?l=20via=20ESC=20the=20in-cell=20editing=20of=20the=20tablesList?= =?UTF-8?q?View=20(and=20avoiding=20to=20call=20completion=20for=20Query?= =?UTF-8?q?=20Editor)=20and=20Bundle=20Editor's=20outlineView;=20in=20addi?= =?UTF-8?q?tion=20the=20focus=20remains=20at=20the=20view?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPBundleEditorController.m | 2 +- Source/SPTablesList.m | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/SPBundleEditorController.m b/Source/SPBundleEditorController.m index dffcb20c..32f5b581 100644 --- a/Source/SPBundleEditorController.m +++ b/Source/SPBundleEditorController.m @@ -1257,7 +1257,7 @@ */ - (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command { - if ( [[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(_cancelKey:)] || + if ( [[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(cancelOperation:)] || [textView methodForSelector:command] == [textView methodForSelector:@selector(complete:)] ) { //abort editing diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m index 54e0f400..da787a6d 100644 --- a/Source/SPTablesList.m +++ b/Source/SPTablesList.m @@ -1358,11 +1358,12 @@ [[control window] makeFirstResponder:control]; return TRUE; - } else if ( [[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(_cancelKey:)] || + } else if ( [[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(cancelOperation:)] || [textView methodForSelector:command] == [textView methodForSelector:@selector(complete:)] ) { //abort editing [control abortEditing]; + [[NSApp mainWindow] makeFirstResponder:tablesListView]; return TRUE; } else{ -- cgit v1.2.3