Преглед изворни кода

fix https://trac.osgeo.org/grass/ticket/1232 (gui modeler don't works as aspected)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@44570 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa пре 14 година
родитељ
комит
2979ceb47d
2 измењених фајлова са 9 додато и 8 уклоњено
  1. 6 7
      gui/wxpython/gui_modules/gmodeler.py
  2. 3 1
      gui/wxpython/gui_modules/goutput.py

+ 6 - 7
gui/wxpython/gui_modules/gmodeler.py

@@ -952,7 +952,7 @@ class ModelFrame(wx.Frame):
             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 @@ class ModelFrame(wx.Frame):
             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))

+ 3 - 1
gui/wxpython/gui_modules/goutput.py

@@ -722,7 +722,7 @@ class GMConsole(wx.SplitterWindow):
         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 \
@@ -745,6 +745,8 @@ class GMConsole(wx.SplitterWindow):
                 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"):