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/SPFieldEditorController.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/SPFieldEditorController.m')
-rw-r--r-- | Source/SPFieldEditorController.m | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m index 05266381..a5ec347d 100644 --- a/Source/SPFieldEditorController.m +++ b/Source/SPFieldEditorController.m @@ -29,6 +29,7 @@ #import "SPDataCellFormatter.h" #import "SPTooltip.h" #import "SPGeometryDataView.h" +#import "SPCopyTable.h" #include <objc/objc-runtime.h> @implementation SPFieldEditorController @@ -403,8 +404,11 @@ } // Locate the caret in editTextView - // (to select all takes a bit time for large data) - [editTextView setSelectedRange:NSMakeRange(0,0)]; + // (restore a given selection coming from the in-cell editing mode) + NSRange selRange = [callerInstance fieldEditorSelectedRange]; + [editTextView setSelectedRange:selRange]; + [callerInstance setFieldEditorSelectedRange:NSMakeRange(0,0)]; + // If the string content is NULL select NULL for convenience if([stringValue isEqualToString:[prefs objectForKey:SPNullValue]]) |