From eee1ea7a09c4f551da1b84776fe63ffdf5ad6a14 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Wed, 19 Feb 2014 20:55:05 +0100 Subject: [PATCH] fontmanager fix --- AppKit/CPFontManager.j | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/AppKit/CPFontManager.j b/AppKit/CPFontManager.j index a3932a469..b5c7d7ec3 100644 --- a/AppKit/CPFontManager.j +++ b/AppKit/CPFontManager.j @@ -237,6 +237,7 @@ CPRemoveTraitFontAction = 7; { var tag = [sender tag]; _activeChange = tag === nil ? @{} : @{ @"addTraits": tag }; + _fontAction = CPAddTraitFontAction; [self sendAction]; } @@ -392,7 +393,14 @@ CPRemoveTraitFontAction = 7; break; case CPAddTraitFontAction: - newFont = [self convertFont:aFont toHaveTrait:[self traitsOfFont:aFont]]; + newFont = aFont; + if (!_activeChange) + break; + + var addTraits = [_activeChange valueForKey:@"addTraits"]; + + if (addTraits) + newFont = [self convertFont:aFont toHaveTrait:addTraits]; break; case CPSizeUpFontAction: