[GRASS-SVN] r58665 - grass/trunk/gui/wxpython/gmodeler

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jan 10 07:03:50 PST 2014


Author: martinl
Date: 2014-01-10 07:03:50 -0800 (Fri, 10 Jan 2014)
New Revision: 58665

Modified:
   grass/trunk/gui/wxpython/gmodeler/frame.py
Log:
wxGUI/modeler: do not hide progress bar

Modified: grass/trunk/gui/wxpython/gmodeler/frame.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/frame.py	2014-01-10 13:43:39 UTC (rev 58664)
+++ grass/trunk/gui/wxpython/gmodeler/frame.py	2014-01-10 15:03:50 UTC (rev 58665)
@@ -119,7 +119,7 @@
         self._gconsole.Bind(EVT_CMD_DONE,
             lambda event: self._switchPageHandler(event=event, notification=Notification.RAISE_WINDOW))
         self.Bind(EVT_CMD_RUN, self.OnCmdRun)
-        self.Bind(EVT_CMD_DONE, self.OnCmdDone)
+        self._gconsole.Bind(EVT_CMD_DONE, self.OnCmdDone) # rewrite default method to avoid hiding progress bar
         self.Bind(EVT_CMD_PREPARE, self.OnCmdPrepare)
         
         self.notebook.AddPage(page = self.canvas, text=_('Model'), name = 'model')
@@ -235,6 +235,7 @@
         
     def OnCmdDone(self, event):
         """!Command done (or aborted)"""
+        self.goutput.GetProgressBar().SetValue(0)
         try:
             action = self.GetModel().GetItems()[event.pid]
             if hasattr(action, "task"):
@@ -486,7 +487,10 @@
         self.model.Run(self._gconsole, self.OnDone, parent = self)
         
     def OnDone(self, cmd, returncode):
-        """!Computation finished"""
+        """!Computation finished
+
+        @todo: not called -- must be fixed
+        """
         self.SetStatusText('', 0)
         # restore original files
         if hasattr(self.model, "fileInput"):



More information about the grass-commit mailing list