Explorar o código

wxGUI/preferences: fix error when setting default

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57211 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová %!s(int64=11) %!d(string=hai) anos
pai
achega
d3e1944949
Modificáronse 2 ficheiros con 3 adicións e 2 borrados
  1. 1 1
      gui/wxpython/core/settings.py
  2. 2 1
      gui/wxpython/gui_core/preferences.py

+ 1 - 1
gui/wxpython/core/settings.py

@@ -191,7 +191,7 @@ class Settings:
                     'selection' : 0,
                     'selection' : 0,
                     },
                     },
                 'nvizDepthBuffer' : {
                 'nvizDepthBuffer' : {
-                    'value' : 16,
+                    'value' : '16',
                     },
                     },
                 },
                 },
             #
             #

+ 2 - 1
gui/wxpython/gui_core/preferences.py

@@ -798,7 +798,8 @@ class PreferencesDialog(PreferencesBaseDialog):
                           wx.ALIGN_CENTER_VERTICAL,
                           wx.ALIGN_CENTER_VERTICAL,
                           pos = (row, 0))
                           pos = (row, 0))
             value = self.settings.Get(group='display', key='nvizDepthBuffer', subkey='value')
             value = self.settings.Get(group='display', key='nvizDepthBuffer', subkey='value')
-            textCtrl = wx.TextCtrl(parent=panel, id=wx.ID_ANY, value=str(value), validator=IntegerValidator())
+            textCtrl = wx.TextCtrl(parent=panel, id=wx.ID_ANY, value=str(value), validator=IntegerValidator(),
+                                   name='GetValue')
             self.winId['display:nvizDepthBuffer:value'] = textCtrl.GetId()
             self.winId['display:nvizDepthBuffer:value'] = textCtrl.GetId()
             gridSizer.Add(item = textCtrl,
             gridSizer.Add(item = textCtrl,
                           flag = wx.ALIGN_RIGHT |
                           flag = wx.ALIGN_RIGHT |