diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-10-29 22:52:44 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-10-29 22:52:44 +0000 |
commit | 8a061fc1d3903ca61ab6287ce822ab8d500ce4bb (patch) | |
tree | 217ed443792333a0c8d1f900760714a672be6691 /Source/SPCustomQuery.m | |
parent | c9b0e698e7d2bcdbe7257555f54de62241db0531 (diff) | |
download | sequelpro-8a061fc1d3903ca61ab6287ce822ab8d500ce4bb.tar.gz sequelpro-8a061fc1d3903ca61ab6287ce822ab8d500ce4bb.tar.bz2 sequelpro-8a061fc1d3903ca61ab6287ce822ab8d500ce4bb.zip |
• enabled Find Panel inside Field Editor Sheet's textView
- to enable Find Panel in such a NSTextView which will be displayed in a sheet one has to do the following:
* [main problem is that Find Panel validates its buttons against [[NSApp mainWindow] firstResponder] == NSTextView]
* subclass the NSTextView and add the methods becomeFirstResponder and resignFirstResponder which has to return YES
* since the last first responder remains the first mainWindow responder status one has to set [[NSApp mainWindow] makeFirstResponder:theTextView] directly after displaying the sheet
• corrected SPUserManager message in (IBAction)removeHost:
Diffstat (limited to 'Source/SPCustomQuery.m')
-rw-r--r-- | Source/SPCustomQuery.m | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index 41a6b62f..1a7eeffe 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -2319,11 +2319,6 @@ [NSNumber numberWithBool:isFieldEditable], @"isFieldEditable", nil]]; - // Preserve focus and restore selection indexes if appropriate - [[tableDocumentInstance parentWindow] makeFirstResponder:customQueryView]; - if (selectionIndexToRestore) - [customQueryView selectRowIndexes:selectionIndexToRestore byExtendingSelection:NO]; - return NO; } @@ -3418,12 +3413,6 @@ NSUInteger column = [[contextInfo objectForKey:@"column"] integerValue]; BOOL isFieldEditable = ([contextInfo objectForKey:@"isFieldEditable"]) ? YES : NO; - // if ([data isKindOfClass:[NSString class]] - // && [data isEqualToString:[prefs objectForKey:SPNullValue]] - // && [[NSArrayObjectAtIndex(dataColumns, column) objectForKey:@"null"] boolValue]) - // { - // data = [[NSNull null] retain]; - // } if(isFieldEditable) { [self tableView:customQueryView setObjectValue:[[data copy] autorelease] forTableColumn:[customQueryView tableColumnWithIdentifier:[contextInfo objectForKey:@"column"]] row:row]; } @@ -3434,7 +3423,11 @@ fieldEditor = nil; } - // [[tableDocumentInstance parentWindow] makeFirstResponder:tableContentView]; + // Preserve focus and restore selection indexes if appropriate + [[tableDocumentInstance parentWindow] makeFirstResponder:customQueryView]; + if (selectionIndexToRestore) + [customQueryView selectRowIndexes:selectionIndexToRestore byExtendingSelection:NO]; + } #pragma mark - |