[GRASS-SVN] r67859 - in grass/branches/releasebranch_7_0/gui/wxpython: gmodeler gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 17 02:02:02 PST 2016


Author: martinl
Date: 2016-02-17 02:02:02 -0800 (Wed, 17 Feb 2016)
New Revision: 67859

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/dialogs.py
   grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py
   grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py
Log:
wxGUI: fixes g.gui.gmodeler - blue diagram when adding a raster data (#2906)
       (merge r67857 from trunk)


Modified: grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/dialogs.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/dialogs.py	2016-02-17 09:59:15 UTC (rev 67858)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/dialogs.py	2016-02-17 10:02:02 UTC (rev 67859)
@@ -55,7 +55,8 @@
         self.element = Select(parent = self.panel,
                               type = self.shape.GetPrompt(),
                               validator = SimpleValidator(callback = self.ValidatorCallback))
-        self.element.SetValue(shape.GetValue())
+        if shape.GetValue():
+            self.element.SetValue(shape.GetValue())
         
         self.Bind(wx.EVT_BUTTON, self.OnOK,     self.btnOK)
         self.Bind(wx.EVT_BUTTON, self.OnCancel, self.btnCancel)

Modified: grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py	2016-02-17 09:59:15 UTC (rev 67858)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gmodeler/frame.py	2016-02-17 10:02:02 UTC (rev 67859)
@@ -725,6 +725,7 @@
         data.SetPropDialog(dlg)
         dlg.CentreOnParent()
         ret = dlg.ShowModal()
+        data.SetPrompt(dlg.GetType())
         dlg.Destroy()
         if ret != wx.ID_OK:
             return

Modified: grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py	2016-02-17 09:59:15 UTC (rev 67858)
+++ grass/branches/releasebranch_7_0/gui/wxpython/gui_core/gselect.py	2016-02-17 10:02:02 UTC (rev 67859)
@@ -410,8 +410,9 @@
         """
         # update list
         self.seltree.DeleteAllItems()
-        self._getElementList(self.type, self.mapsets, elements, exclude)
-
+        if self.type:
+            self._getElementList(self.type, self.mapsets, elements, exclude)
+        
         if len(self.value) > 0:
             root = self.seltree.GetRootItem()
             if not root:



More information about the grass-commit mailing list