[GRASS-SVN] r44898 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 6 06:04:58 EST 2011


Author: martinl
Date: 2011-01-06 03:04:57 -0800 (Thu, 06 Jan 2011)
New Revision: 44898

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/layertree.py
Log:
wxGUI: check only if raster/vector exists
(merge r44896 from trunk)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/layertree.py	2011-01-06 10:31:17 UTC (rev 44897)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/layertree.py	2011-01-06 11:04:57 UTC (rev 44898)
@@ -1334,9 +1334,13 @@
             mapLayer = self.GetPyData(layer)[0]['maplayer']
             self.SetItemText(layer, mapName)
             
-            if not mapText or \
-                    (mapLayer and \
-                         not grass.find_file(name = mapName, element = mapLayer.GetElement())['fullname']):
+            found = True
+            if mapLayer and \
+                    mapLayer.GetType() in ('raster', '3d-raster', 'vector') and \
+                    not grass.find_file(name = mapName, element = mapLayer.GetElement())['fullname']:
+                found = False
+            
+            if not mapText or not found:
                 propwin.Hide()
                 GWarning(parent = self,
                          message = _("Map <%s> not found.") % mapName)



More information about the grass-commit mailing list