diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-10-30 09:45:43 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-10-30 09:45:43 +0000 |
commit | e3f9028ab739d9e973dd97345605c2abc2a79739 (patch) | |
tree | 03b08d41987d805e0a9599fc41f09253b47cfc7a /Source/SPTableContent.m | |
parent | c93f78981eba6eb1f14dcd00c675c48b675b0494 (diff) | |
download | sequelpro-e3f9028ab739d9e973dd97345605c2abc2a79739.tar.gz sequelpro-e3f9028ab739d9e973dd97345605c2abc2a79739.tar.bz2 sequelpro-e3f9028ab739d9e973dd97345605c2abc2a79739.zip |
• Custom and Content table in-cell editing
- a possible given selection done inside the edited cell will be passed to the field editor sheet for convenience since one often forgets that the field editor sheet mode is active
Diffstat (limited to 'Source/SPTableContent.m')
-rw-r--r-- | Source/SPTableContent.m | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 13d58e3a..fe9e37ec 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -171,6 +171,8 @@ [paginationView setFrame:paginationViewFrame]; [contentViewPane addSubview:paginationView]; + [tableContentView setFieldEditorSelectedRange:NSMakeRange(0,0)]; + // Init Filter Table GUI [filterTableDistinctMenuItem setState:(filterTableDistinct) ? NSOnState : NSOffState]; [filterTableNegateCheckbox setState:(filterTableNegate) ? NSOnState : NSOffState]; @@ -4210,6 +4212,8 @@ if ((fieldType = [[tableDataInstance columnWithName:[[NSArrayObjectAtIndex([tableContentView tableColumns], column) headerCell] stringValue]] objectForKey:@"typegrouping"]) && ([fieldType isEqualToString:@"textdata"] || [fieldType isEqualToString:@"blobdata"] || [multipleLineEditingButton state] == NSOnState)) { + [tableContentView setFieldEditorSelectedRange:[fieldEditor selectedRange]]; + // Cancel editing [control abortEditing]; @@ -4475,6 +4479,16 @@ } } +- (void)setFieldEditorSelectedRange:(NSRange)aRange +{ + [tableContentView setFieldEditorSelectedRange:aRange]; +} + +- (NSRange)fieldEditorSelectedRange +{ + return [tableContentView fieldEditorSelectedRange]; +} + #pragma mark - /** |