aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-05-28 07:51:52 +0000
committerBibiko <bibiko@eva.mpg.de>2009-05-28 07:51:52 +0000
commit253c8dfb481f1fc40c418933add1921630e1babb (patch)
tree6bdf3d41e49f0ee46d85375ec6bbd52bb19874da /Source
parent1979b7c94813e8278b4b7616aeafecd5a406f7a1 (diff)
downloadsequelpro-253c8dfb481f1fc40c418933add1921630e1babb.tar.gz
sequelpro-253c8dfb481f1fc40c418933add1921630e1babb.tar.bz2
sequelpro-253c8dfb481f1fc40c418933add1921630e1babb.zip
• control editable status of CMTextView while changing the font size via ⌘+/- or finger gesture since CMTextVIew is also used for other views
Diffstat (limited to 'Source')
-rw-r--r--Source/CMTextView.m6
1 files changed, 6 insertions, 0 deletions
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];
}
/*