[GRASS-SVN] r52311 - grass/branches/develbranch_6/gui/wxpython/mapdisp

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 5 08:02:29 PDT 2012


Author: annakrat
Date: 2012-07-05 08:02:28 -0700 (Thu, 05 Jul 2012)
New Revision: 52311

Modified:
   grass/branches/develbranch_6/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/develbranch_6/gui/wxpython/mapdisp/mapwindow.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/mapdisp/mapwindow.py	2012-07-05 15:01:29 UTC (rev 52310)
+++ grass/branches/develbranch_6/gui/wxpython/mapdisp/mapwindow.py	2012-07-05 15:02:28 UTC (rev 52311)
@@ -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