From efa74067418887ba714d9af48be17d47d74cf7a8 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Wed, 26 Oct 2016 19:53:59 +0200 Subject: [PATCH] fixed: typing font was nil in sometimes cib-generated textviews --- AppKit/CPTextView/CPTextView.j | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index d0060aa2d..c4a7138a0 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -133,7 +133,7 @@ var kDelegateRespondsTo_textShouldBeginEditing CPColor _textColor @accessors(property=textColor); CPDictionary _selectedTextAttributes @accessors(property=selectedTextAttributes); CPDictionary _typingAttributes @accessors(property=typingAttributes); - CPFont _font @accessors(property=font); + CPFont _font; CPLayoutManager _layoutManager @accessors(getter=layoutManager); CPRange _selectionRange @accessors(getter=selectedRange); CPSelectionGranularity _selectionGranularity @accessors(property=selectionGranularity); @@ -1586,6 +1586,11 @@ var kDelegateRespondsTo_textShouldBeginEditing #pragma mark - #pragma mark Font methods +- (CPFont)font +{ + return _font || [CPFont systemFontOfSize:12.0]; +} + - (void)setFont:(CPFont)font { _font = font;