[GRASS-SVN] r67857 - in grass/trunk/gui/wxpython: gmodeler gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 17 01:06:46 PST 2016


Author: martinl
Date: 2016-02-17 01:06:46 -0800 (Wed, 17 Feb 2016)
New Revision: 67857

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


Modified: grass/trunk/gui/wxpython/gmodeler/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/dialogs.py	2016-02-17 08:39:45 UTC (rev 67856)
+++ grass/trunk/gui/wxpython/gmodeler/dialogs.py	2016-02-17 09:06:46 UTC (rev 67857)
@@ -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/trunk/gui/wxpython/gmodeler/frame.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/frame.py	2016-02-17 08:39:45 UTC (rev 67856)
+++ grass/trunk/gui/wxpython/gmodeler/frame.py	2016-02-17 09:06:46 UTC (rev 67857)
@@ -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/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py	2016-02-17 08:39:45 UTC (rev 67856)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py	2016-02-17 09:06:46 UTC (rev 67857)
@@ -413,8 +413,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