From 253c8dfb481f1fc40c418933add1921630e1babb Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 28 May 2009 07:51:52 +0000 Subject: =?UTF-8?q?=E2=80=A2=20control=20editable=20status=20of=20CMTextVi?= =?UTF-8?q?ew=20while=20changing=20the=20font=20size=20via=20=E2=8C=98+/-?= =?UTF-8?q?=20or=20finger=20gesture=20since=20CMTextVIew=20is=20also=20use?= =?UTF-8?q?d=20for=20other=20views?= 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 5afe2fef..0a38712f 100644 --- a/Source/CMTextView.m +++ b/Source/CMTextView.m @@ -996,7 +996,10 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) - (void)makeTextSizeLarger { NSFont *aFont = [self font]; + BOOL editableStatus = [self isEditable]; + [self setEditable:YES]; [self setFont:[[NSFontManager sharedFontManager] convertFont:aFont toSize:[aFont pointSize]+1]]; + [self setEditable:editableStatus]; } /* @@ -1006,7 +1009,10 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) { NSFont *aFont = [self font]; int newSize = ([aFont pointSize]-1 < 4) ? [aFont pointSize] : [aFont pointSize]-1; + BOOL editableStatus = [self isEditable]; + [self setEditable:YES]; [self setFont:[[NSFontManager sharedFontManager] convertFont:aFont toSize:newSize]]; + [self setEditable:editableStatus]; } /* -- cgit v1.2.3