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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 9 05:39:12 EST 2010


Author: martinl
Date: 2010-12-09 02:39:12 -0800 (Thu, 09 Dec 2010)
New Revision: 44572

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gmodeler.py
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py
Log:
fix #1232 (gui modeler don't works as aspected)
(merge r44570 from trunk)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gmodeler.py	2010-12-09 10:36:38 UTC (rev 44571)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/gmodeler.py	2010-12-09 10:39:12 UTC (rev 44572)
@@ -952,7 +952,7 @@
             if not item.IsEnabled():
                 continue
             if isinstance(item, ModelAction):
-                if item.GetLoopId():
+                if item.GetBlockId():
                     continue
                 self._runAction(item, params)
             elif isinstance(item, ModelLoop):
@@ -1033,12 +1033,11 @@
             if xmax > xmaxImg:
                 xmaxImg = xmax
             if ymin < yminImg:
-                xminImg = xmin
-            if ymax < ymaxImg:
-                xminImg = xmin
-        
-        size = wx.Size(int(xmaxImg - xminImg),
-                       int(ymaxImg - ymaxImg))
+                yminImg = ymin
+            if ymax > ymaxImg:
+                ymaxImg = ymax
+        size = wx.Size(int(xmaxImg - xminImg) + 50,
+                       int(ymaxImg - yminImg) + 50)
         bitmap = wx.EmptyBitmap(width = size.width, height = size.height)
         
         filetype, ltype = GetImageHandlers(wx.ImageFromBitmap(bitmap))

Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py	2010-12-09 10:36:38 UTC (rev 44571)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py	2010-12-09 10:39:12 UTC (rev 44572)
@@ -720,7 +720,7 @@
         self.console_progressbar.SetValue(0) # reset progress bar on '0%'
 
         self.cmd_output_timer.Stop()
-        
+
         if self.parent.GetName() == "LayerManager":
             self.btn_abort.Enable(False)
             if event.cmd[0] not in globalvar.grassCmd['all'] or \
@@ -743,6 +743,8 @@
                 if mapName in mapLayers:
                     display.GetWindow().UpdateMap(render = True)
                     return
+        elif self.parent.GetName() == 'Modeler':
+            pass
         else: # standalone dialogs
             dialog = self.parent.parent
             if hasattr(self.parent.parent, "btn_abort"):



More information about the grass-commit mailing list