[GRASS-SVN] r52819 - in grass/branches/develbranch_6/gui/wxpython: gui_core lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Aug 21 07:58:59 PDT 2012


Author: annakrat
Date: 2012-08-21 07:58:59 -0700 (Tue, 21 Aug 2012)
New Revision: 52819

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py
   grass/branches/develbranch_6/gui/wxpython/lmgr/frame.py
Log:
wxGUI: quick fix for #1565 (merge from trunk, r52818)

Modified: grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py	2012-08-21 14:46:44 UTC (rev 52818)
+++ grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py	2012-08-21 14:58:59 UTC (rev 52819)
@@ -879,7 +879,10 @@
                     event.cmd[0] == 'r.mapcalc':
                 return
             
-            display = self.parent.GetLayerTree().GetMapDisplay()
+            tree = self.parent.GetLayerTree()
+            display = None
+            if tree:
+                display = tree.GetMapDisplay()
             if not display or not display.IsAutoRendered():
                 return
             mapLayers = map(lambda x: x.GetName(),

Modified: grass/branches/develbranch_6/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/lmgr/frame.py	2012-08-21 14:46:44 UTC (rev 52818)
+++ grass/branches/develbranch_6/gui/wxpython/lmgr/frame.py	2012-08-21 14:58:59 UTC (rev 52819)
@@ -482,7 +482,9 @@
 
     def GetLayerTree(self):
         """!Get current layer tree"""
-        return self.curr_page.maptree
+        if self.curr_page:
+            return self.curr_page.maptree
+        return None
     
     def GetLogWindow(self):
         """!Get widget for command output"""



More information about the grass-commit mailing list