aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPCustomQuery.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-10-30 09:45:43 +0000
committerBibiko <bibiko@eva.mpg.de>2010-10-30 09:45:43 +0000
commite3f9028ab739d9e973dd97345605c2abc2a79739 (patch)
tree03b08d41987d805e0a9599fc41f09253b47cfc7a /Source/SPCustomQuery.m
parentc93f78981eba6eb1f14dcd00c675c48b675b0494 (diff)
downloadsequelpro-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/SPCustomQuery.m')
-rw-r--r--Source/SPCustomQuery.m16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index 831ff44f..4b3ca24b 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -3436,6 +3436,16 @@
}
+- (void)setFieldEditorSelectedRange:(NSRange)aRange
+{
+ [customQueryView setFieldEditorSelectedRange:aRange];
+}
+
+- (NSRange)fieldEditorSelectedRange
+{
+ return [customQueryView fieldEditorSelectedRange];
+}
+
#pragma mark -
- (id)init
@@ -3599,6 +3609,9 @@
// Check if current edited field is a blob or should be displayed in field editor sheet
if (isBlob || [multipleLineEditingButton state] == NSOnState)
{
+
+ [customQueryView setFieldEditorSelectedRange:[fieldEditor selectedRange]];
+
// Cancel editing
[control abortEditing];
@@ -3680,6 +3693,9 @@
*/
- (void)awakeFromNib
{
+
+ [customQueryView setFieldEditorSelectedRange:NSMakeRange(0,0)];
+
// Set pre-defined menu tags
[queryFavoritesSaveAsMenuItem setTag:SP_SAVE_SELECTION_FAVORTITE_MENUITEM_TAG];
[queryFavoritesSaveAllMenuItem setTag:SP_SAVE_ALL_FAVORTITE_MENUITEM_TAG];