[GRASS-SVN] r44896 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 6 05:17:47 EST 2011


Author: martinl
Date: 2011-01-06 02:17:47 -0800 (Thu, 06 Jan 2011)
New Revision: 44896

Modified:
   grass/trunk/gui/wxpython/gui_modules/layertree.py
Log:
wxGUI: check only if raster/vector exists


Modified: grass/trunk/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/layertree.py	2011-01-05 23:11:09 UTC (rev 44895)
+++ grass/trunk/gui/wxpython/gui_modules/layertree.py	2011-01-06 10:17:47 UTC (rev 44896)
@@ -1333,9 +1333,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