From 6686223d2c30a7b99b8de11a8659851725f6326f Mon Sep 17 00:00:00 2001 From: mtvee Date: Tue, 14 Jul 2009 13:43:15 +0000 Subject: - changed history and favorite selection to insert rather then overwrite query editor buffer --- Source/CustomQuery.m | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'Source') diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index ecc32e3d..7dc8e4dc 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -168,12 +168,8 @@ [NSApp endSheet:queryFavoritesSheet]; [queryFavoritesSheet orderOut:nil]; } else if ( [queryFavoritesButton indexOfSelectedItem] != 3) { -//choose favorite - // Register the next action for undo - [textView shouldChangeTextInRange:[textView selectedRange] replacementString:[queryFavoritesButton titleOfSelectedItem]]; - [textView replaceCharactersInRange:[textView selectedRange] withString:[queryFavoritesButton titleOfSelectedItem]]; - // invoke textStorageDidProcessEditing: for syntax highlighting and auto-uppercase - [textView insertText:@""]; + //choose favorite + [textView insertText:[queryFavoritesButton titleOfSelectedItem]]; } } @@ -182,12 +178,7 @@ */ - (IBAction)chooseQueryHistory:(id)sender { - // Register the next action for undo - [textView shouldChangeTextInRange:NSMakeRange(0,[[textView string] length]) replacementString:[queryHistoryButton titleOfSelectedItem]]; - [textView setString:[queryHistoryButton titleOfSelectedItem]]; - // Invoke textStorageDidProcessEditing: for syntax highlighting and auto-uppercase - [textView insertText:@""]; - [textView selectAll:self]; + [textView insertText:[queryHistoryButton titleOfSelectedItem]]; } /* -- cgit v1.2.3