瀏覽代碼

Parse font names correctly (e.g., "Luxi Mono:Regular" is not a color value)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@36689 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho 16 年之前
父節點
當前提交
a1ffe5cd89
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      gui/wxpython/gui_modules/preferences.py

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

@@ -696,7 +696,10 @@ class Settings:
             elif value == 'None':
                 value = None
             elif ':' in value: # -> color
-                value = tuple(map(int, value.split(':')))
+		try:
+                    value = tuple(map(int, value.split(':')))
+		except ValueError: # -> string
+		    pass
             else:
                 try:
                     value = int(value)