diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-03-06 17:45:29 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-03-06 17:45:29 +0000 |
commit | e63a68f557f7916bc69caf0105e407ae21249e23 (patch) | |
tree | 28f875531bd2982c4888f20a658f13e4a8cb778a | |
parent | ecbc556ad0ed6e6c66c76145085a524bf8d6035d (diff) | |
download | sequelpro-e63a68f557f7916bc69caf0105e407ae21249e23.tar.gz sequelpro-e63a68f557f7916bc69caf0105e407ae21249e23.tar.bz2 sequelpro-e63a68f557f7916bc69caf0105e407ae21249e23.zip |
• set CMTextView temporarily to editable:YES if the tab stops width is changed to avoid exceptions
-rw-r--r-- | Source/CMTextView.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/CMTextView.m b/Source/CMTextView.m index 3a95a6b5..e32e1234 100644 --- a/Source/CMTextView.m +++ b/Source/CMTextView.m @@ -3097,6 +3097,9 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) NSMutableArray *myArrayOfTabs; NSMutableParagraphStyle *paragraphStyle; + BOOL oldEditableStatus = [self isEditable]; + [self setEditable:YES]; + NSInteger tabStopWidth = [prefs integerForKey:SPCustomQueryEditorTabStopWidth]; if(tabStopWidth < 1) tabStopWidth = 1; @@ -3130,6 +3133,9 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) [self setDefaultParagraphStyle:paragraphStyle]; [paragraphStyle release]; [self setFont:tvFont]; + + [self setEditable:oldEditableStatus]; + } - (void)drawRect:(NSRect)rect { |