[GRASS-SVN] r48700 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 9 18:20:50 EDT 2011


Author: martinl
Date: 2011-10-09 15:20:49 -0700 (Sun, 09 Oct 2011)
New Revision: 48700

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gmodeler.py
Log:
wxGUI/modeler: fix OnModelNew()
              (merge r48698 from devbr6)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gmodeler.py	2011-10-09 22:17:56 UTC (rev 48699)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gmodeler.py	2011-10-09 22:20:49 UTC (rev 48700)
@@ -904,6 +904,8 @@
         self.canvas.GetDiagram().DeleteAllShapes()
         self.model.Reset()
         self.canvas.Refresh()
+        self.itemPanel.Update()
+        self.variablePanel.Reset()
         
         # no model file loaded
         self.modelFile = None
@@ -3888,6 +3890,11 @@
         """!Reload list of variables"""
         self.list.OnReload(None)
         
+    def Reset(self):
+        """!Remove all variables"""
+        self.list.DeleteAllItems()
+        self.parent.GetModel().SetVariables([])
+        
 class VariableListCtrl(ModelListCtrl):
     def __init__(self, parent, columns, **kwargs):
         """!List of model variables"""



More information about the grass-commit mailing list