[GRASS-SVN] r52310 - grass/trunk/gui/wxpython/mapdisp

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 5 08:01:31 PDT 2012


Author: annakrat
Date: 2012-07-05 08:01:29 -0700 (Thu, 05 Jul 2012)
New Revision: 52310

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

Modified: grass/trunk/gui/wxpython/mapdisp/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/mapwindow.py	2012-07-05 14:36:20 UTC (rev 52309)
+++ grass/trunk/gui/wxpython/mapdisp/mapwindow.py	2012-07-05 15:01:29 UTC (rev 52310)
@@ -508,7 +508,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