[GRASS-SVN] r44002 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 24 02:54:11 EDT 2010


Author: martinl
Date: 2010-10-23 23:54:11 -0700 (Sat, 23 Oct 2010)
New Revision: 44002

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py
Log:
wxGUI: fix menuform dialog (map tree)
(merge r44000 from trunk)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py	2010-10-24 06:53:20 UTC (rev 44001)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/goutput.py	2010-10-24 06:54:11 UTC (rev 44002)
@@ -735,13 +735,19 @@
                 dialog.btn_run.Enable(True)
             
             if event.returncode == 0 and not event.aborted:
-                winName = self.parent.parent.parent.GetName()
+                try:
+                    winName = self.parent.parent.parent.GetName()
+                except AttributeError:
+                    winName = ''
+                
                 if winName == 'LayerManager':
                     mapTree = self.parent.parent.parent.GetLayerTree()
                 elif winName == 'LayerTree':
                     mapTree = self.parent.parent.parent
-                else: # GMConsole
+                elif winName: # GMConsole
                     mapTree = self.parent.parent.parent.parent.GetLayerTree()
+                else:
+                    mapTree = None
                 
                 cmd = dialog.notebookpanel.createCmd(ignoreErrors = True)
                 if hasattr(dialog, "addbox") and dialog.addbox.IsChecked():



More information about the grass-commit mailing list