[GRASS-SVN] r65750 - grass/branches/releasebranch_7_0/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 21 03:46:55 PDT 2015


Author: annakrat
Date: 2015-07-21 03:46:54 -0700 (Tue, 21 Jul 2015)
New Revision: 65750

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py
Log:
wxGUI: fix reopening d.vect.thematic properties with multiple colors (merge from trunk, r65749)

Modified: grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py	2015-07-21 10:45:36 UTC (rev 65749)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/forms.py	2015-07-21 10:46:54 UTC (rev 65750)
@@ -1462,7 +1462,8 @@
                     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:
@@ -1477,6 +1478,8 @@
                         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()



More information about the grass-commit mailing list