Browse Source

wxGUI/gmodeler: minor fixes when running model
(merge https://trac.osgeo.org/grass/changeset/49389 from devbr6)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@49390 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 13 years ago
parent
commit
0a50a5fe65
1 changed files with 2 additions and 3 deletions
  1. 2 3
      gui/wxpython/gmodeler/model.py

+ 2 - 3
gui/wxpython/gmodeler/model.py

@@ -511,6 +511,7 @@ class Model(object):
                                    style = wx.YES_NO | wx.NO_DEFAULT |
                                    wx.ICON_QUESTION | wx.CENTRE)
             ret = dlg.ShowModal()
+            dlg.Destroy()
             if ret != wx.ID_YES:
                 return
         
@@ -527,6 +528,7 @@ class Model(object):
                 return
             
             err = dlg.GetErrors()
+            dlg.Destroy()
             if err:
                 GError(parent = parent, message = unicode('\n'.join(err)))
                 return
@@ -613,9 +615,6 @@ class Model(object):
                 for p in item['params']:
                     p['value'] = ''
         
-        if params:
-            dlg.Destroy()
-        
     def DeleteIntermediateData(self, log):
         """!Detele intermediate data"""
         rast, vect, rast3d, msg = self.GetIntermediateData()