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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jun 21 11:47:43 EDT 2009


Author: martinl
Date: 2009-06-21 11:47:42 -0400 (Sun, 21 Jun 2009)
New Revision: 38012

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py
Log:
wxGUI: don't crash when vdigit props are not set


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py	2009-06-21 14:10:08 UTC (rev 38011)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp_window.py	2009-06-21 15:47:42 UTC (rev 38012)
@@ -1177,7 +1177,9 @@
         """!Trac geometry attributes?"""
         item = self.tree.FindItemByData('maplayer', mapLayer)
         vdigit = self.tree.GetPyData(item)[0]['vdigit']
-        if vdigit.has_key('geomAttr') and vdigit['geomAttr'].has_key(attrb):
+        if vdigit and \
+                vdigit.has_key('geomAttr') and \
+                vdigit['geomAttr'].has_key(attrb):
             val = -1
             if attrb == 'length':
                 val = digit.GetLineLength(fid)



More information about the grass-commit mailing list