소스 검색

wxGUI: fix font/enc bug

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@47487 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 13 년 전
부모
커밋
8444a58ad0
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      gui/wxpython/gui_modules/preferences.py

+ 6 - 4
gui/wxpython/gui_modules/preferences.py

@@ -742,10 +742,12 @@ class Settings:
         self._readFile(self.filePath, settings)
         
         # set environment variables
-        os.environ["GRASS_FONT"] = self.Get(group = 'display',
-                                            key = 'font', subkey = 'type')
-        os.environ["GRASS_ENCODING"] = self.Get(group = 'display',
-                                                key = 'font', subkey = 'encoding')
+        font = self.Get(group = 'display', key = 'font', subkey = 'type')
+        enc  = self.Get(group = 'display', key = 'font', subkey = 'encoding')
+        if font:
+            os.environ["GRASS_FONT"] = font
+        if enc:
+            os.environ["GRASS_ENCODING"] = enc
         
     def _readFile(self, filename, settings = None):
         """!Read settings from file to dict