Преглед изворни кода

wxGUI: fix reopening d.vect.thematic properties with multiple colors

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65749 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová пре 9 година
родитељ
комит
9c1df47020
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      gui/wxpython/gui_core/forms.py

+ 4 - 1
gui/wxpython/gui_core/forms.py

@@ -1470,7 +1470,8 @@ class CmdPanel(wx.Panel):
                     if p.get('default','') !=  '':
                         default_color, label_color = utils.color_resolve(p['default'])
                     if p.get('value','') !=  '' and p.get('value','') != 'none': # parameter previously set
-                        default_color, label_color = utils.color_resolve(p['value'])
+                        if not p.get('multiple', False):
+                            default_color, label_color = utils.color_resolve(p['value'])
                     if p.get('element', '') == 'color_none' or p.get('multiple', False):
                         this_sizer = wx.BoxSizer(orient = wx.HORIZONTAL)
                     else:
@@ -1485,6 +1486,8 @@ class CmdPanel(wx.Panel):
                         this_sizer.Add(item = txt, proportion = 1,
                                        flag = wx.ADJUST_MINSIZE | wx.LEFT | wx.TOP, border = 5)
                         txt.Bind(wx.EVT_TEXT, self.OnSetValue)
+                        if p.get('value', ''):
+                            txt.SetValue(p['value'])
                         colorSize = 40
                         label_color = ''
                         p['wxId'][1] = txt.GetId()