[GRASS-SVN] r44571 - grass/branches/develbranch_6/gui/wxpython/gui_modules

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


Author: martinl
Date: 2010-12-09 02:36:38 -0800 (Thu, 09 Dec 2010)
New Revision: 44571

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


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2010-12-09 10:31:21 UTC (rev 44570)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2010-12-09 10:36:38 UTC (rev 44571)
@@ -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/develbranch_6/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py	2010-12-09 10:31:21 UTC (rev 44570)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py	2010-12-09 10:36:38 UTC (rev 44571)
@@ -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