[GRASS-SVN] r44001 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 24 02:53:20 EDT 2010


Author: martinl
Date: 2010-10-23 23:53:20 -0700 (Sat, 23 Oct 2010)
New Revision: 44001

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


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py	2010-10-24 06:51:46 UTC (rev 44000)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/goutput.py	2010-10-24 06:53:20 UTC (rev 44001)
@@ -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