#BUGFIX by cg
authorClaus Gittinger <cg@exept.de>
Thu, 21 Apr 2016 16:58:14 +0200
changeset 5675 7bf31ecf9aa3
parent 5674 7a82399d403b
child 5676 20a8f1c87323
#BUGFIX by cg class: TextView changed: #changeFont
TextView.st
--- a/TextView.st	Thu Apr 21 10:57:33 2016 +0200
+++ b/TextView.st	Thu Apr 21 16:58:14 2016 +0200
@@ -2025,7 +2025,7 @@
 changeFont
     "pop up a fontPanel to change font"
 
-    |newFont fp|
+    |newFont fp prefs newPrefs|
 
     self withWaitCursorDo:[
         fp := FontPanel new.
@@ -2037,10 +2037,12 @@
         fp changeFontInAllViews ifTrue:[
             "/ user checked this box - change the defaults,
             "/ and update all other textviews now.
-
+            prefs := UserPreferences current fontPreferences.
+            prefs isNil ifTrue:[ prefs := newPrefs := Dictionary new ].
+            
             TextView defaultFont:newFont.
-            UserPreferences current fontPreferences
-                at:#Text put:(newFont storeString).
+            prefs at:#Text put:(newFont storeString).
+            newPrefs notNil ifTrue:[ UserPreferences current fontPreferences:newPrefs ].
             DebugView newDebugger.
             TextView allSubInstances do:[:v |
                 v font:newFont