TextView.st
branchjv
changeset 5678 9cbcdd21ea39
parent 5660 d6040b3f1a37
parent 5677 fa9074e87571
child 5737 98bc0782ffa1
--- a/TextView.st	Thu Apr 21 06:44:55 2016 +0200
+++ b/TextView.st	Fri Apr 22 06:42:13 2016 +0200
@@ -2025,7 +2025,7 @@
 changeFont
     "pop up a fontPanel to change font"
 
-    |newFont fp|
+    |newFont fp userPrefs fontPrefs newFontPrefs|
 
     self withWaitCursorDo:[
         fp := FontPanel new.
@@ -2037,10 +2037,14 @@
         fp changeFontInAllViews ifTrue:[
             "/ user checked this box - change the defaults,
             "/ and update all other textviews now.
-
+            userPrefs := UserPreferences current.
+            fontPrefs := userPrefs fontPreferences.
+            fontPrefs isNil ifTrue:[ fontPrefs := newFontPrefs := Dictionary new ].
+            
             TextView defaultFont:newFont.
-            UserPreferences current fontPreferences
-                at:#Text put:(newFont storeString).
+            fontPrefs at:#Text put:(newFont storeString).
+            newFontPrefs notNil ifTrue:[ userPrefs fontPreferences:newFontPrefs ].
+            userPrefs beModified.
             DebugView newDebugger.
             TextView allSubInstances do:[:v |
                 v font:newFont