Procházet zdrojové kódy

wxGUI: fix font dialog https://trac.osgeo.org/grass/ticket/2391 - d.font was missing monitor

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@61603 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová před 10 roky
rodič
revize
4f51ec814d
1 změnil soubory, kde provedl 9 přidání a 3 odebrání
  1. 9 3
      gui/wxpython/gui_core/preferences.py

+ 9 - 3
gui/wxpython/gui_core/preferences.py

@@ -1651,9 +1651,15 @@ class DefaultFontDialog(wx.Dialog):
         for the listbox
         for the listbox
         """
         """
         fontlist = []
         fontlist = []
-        ret = RunCommand('d.font',
-                         read = True,
-                         flags = 'l')
+        env = os.environ.copy()
+        driver = UserSettings.Get(group='display', key='driver', subkey='type')
+        if driver == 'png':
+            env['GRASS_RENDER_IMMEDIATE'] = 'png'
+        else:
+            env['GRASS_RENDER_IMMEDIATE'] = 'cairo'
+        ret = RunCommand('d.fontlist',
+                         read=True,
+                         env=env)
         if not ret:
         if not ret:
             return fontlist
             return fontlist