Browse Source

wxGUI/mapcalc: do not load layer if command failed

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54025 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 12 years ago
parent
commit
12c7bd6293
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gui/wxpython/modules/mcalc_builder.py

+ 1 - 1
gui/wxpython/modules/mcalc_builder.py

@@ -510,7 +510,7 @@ class MapCalcFrame(wx.Frame):
         
     def OnDone(self, cmd, returncode):
         """!Add create map to the layer tree"""
-        if not self.addbox.IsChecked():
+        if not self.addbox.IsChecked() or returncode != 0:
             return
         name = self.newmaptxt.GetValue().strip(' "') + '@' + grass.gisenv()['MAPSET']
         mapTree = self.parent.GetLayerTree()