From e63a68f557f7916bc69caf0105e407ae21249e23 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Sat, 6 Mar 2010 17:45:29 +0000 Subject: =?UTF-8?q?=E2=80=A2=20set=20CMTextView=20temporarily=20to=20edita?= =?UTF-8?q?ble:YES=20if=20the=20tab=20stops=20width=20is=20changed=20to=20?= =?UTF-8?q?avoid=20exceptions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/CMTextView.m | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Source/CMTextView.m') 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 { -- cgit v1.2.3