Browse Source

wxGUI: fix trac https://trac.osgeo.org/grass/ticket/305 (Add created map into layer tree: errors for import modules)
(merge from devbr6, https://trac.osgeo.org/grass/changeset/34836)


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

Martin Landa 16 years ago
parent
commit
85e860636d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      gui/wxpython/gui_modules/goutput.py

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

@@ -92,6 +92,7 @@ class CmdThread(threading.Thread):
             time.sleep(.1)
             
             event = wxCmdDone(aborted=aborted,
+                              returncode=self.requestCmd.module.returncode,
                               time=requestTime,
                               pid=requestId)
             
@@ -513,7 +514,8 @@ class GMConsole(wx.Panel):
 
             dialog.btn_run.Enable(True)
 
-            if not event.aborted and hasattr(dialog, "addbox") and \
+            if event.returncode == 0 and \
+                    not event.aborted and hasattr(dialog, "addbox") and \
                     dialog.addbox.IsChecked():
                 # add new map into layer tree
                 if dialog.outputType in ('raster', 'vector'):