[GRASS-SVN] r70469 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 1 17:02:11 PST 2017


Author: wenzeslaus
Date: 2017-02-01 17:02:11 -0800 (Wed, 01 Feb 2017)
New Revision: 70469

Modified:
   grass/trunk/gui/wxpython/gui_core/dialogs.py
Log:
wxGUI: show the font dialog even when the font from settings is not recognized (fixes traceback)

Modified: grass/trunk/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/dialogs.py	2017-02-02 00:44:26 UTC (rev 70468)
+++ grass/trunk/gui/wxpython/gui_core/dialogs.py	2017-02-02 01:02:11 UTC (rev 70469)
@@ -2484,7 +2484,12 @@
             return
 
         if self.font:
-            self.fontlb.SetStringSelection(fontdict_reverse[self.font], True)
+            long_name = fontdict_reverse.get(self.font, None)
+            if long_name:
+                self.fontlb.SetStringSelection(long_name, True)
+            else:
+                # font is not in the list of GRASS recognized fonts
+                self.font = None
 
         gridSizer.AddGrowableCol(0)
         sizer.Add(gridSizer, proportion=1,



More information about the grass-commit mailing list