[GRASS-SVN] r52312 - grass/branches/releasebranch_6_4/gui/wxpython/mapdisp

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 5 08:04:20 PDT 2012


Author: annakrat
Date: 2012-07-05 08:04:20 -0700 (Thu, 05 Jul 2012)
New Revision: 52312

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/mapdisp/mapwindow.py
Log:
wxGUI: added check if overlay mapfile is not None (d.barscale with latlon projection caused error), merge from trunk r52310

Modified: grass/branches/releasebranch_6_4/gui/wxpython/mapdisp/mapwindow.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/mapdisp/mapwindow.py	2012-07-05 15:02:28 UTC (rev 52311)
+++ grass/branches/releasebranch_6_4/gui/wxpython/mapdisp/mapwindow.py	2012-07-05 15:04:20 UTC (rev 52312)
@@ -493,7 +493,8 @@
         """
         imgs = []
         for overlay in self.Map.GetListOfLayers(l_type = "overlay", l_active = True):
-            if os.path.isfile(overlay.mapfile) and os.path.getsize(overlay.mapfile):
+            if overlay.mapfile is not None \
+               and os.path.isfile(overlay.mapfile) and os.path.getsize(overlay.mapfile):
                 img = wx.Image(overlay.mapfile, wx.BITMAP_TYPE_ANY)
                 self.imagedict[img] = { 'id' : overlay.id,
                                         'layer' : overlay }



More information about the grass-commit mailing list