mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Merge pull request #3170 from daboe01/fontpanel-fixes
fixed: fontpanel was crashing
This commit is contained in:
@@ -115,3 +115,4 @@
|
||||
@import "CPWindow.j"
|
||||
@import "CPWindowController.j"
|
||||
@import "CPWorkspace.j"
|
||||
@import "CPFontPanel.j"
|
||||
|
||||
@@ -197,6 +197,9 @@ var _availableTraits= [@"Normal", @"Italic", @"Bold", @"Bold Italic"],
|
||||
if (![self isVisible])
|
||||
return;
|
||||
|
||||
if (![textView respondsToSelector:@selector(_attributesForFontPanel)])
|
||||
return;
|
||||
|
||||
var attribs = [textView _attributesForFontPanel],
|
||||
font = [attribs objectForKey:CPFontAttributeName] || [[textView textStorage] font] || [CPFont systemFontOfSize:12.0],
|
||||
color = [attribs objectForKey:CPForegroundColorAttributeName];
|
||||
|
||||
Reference in New Issue
Block a user