[GRASS-SVN] r41950 - grass-addons/gui/wxpython/data_catalog
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Apr 21 08:38:23 EDT 2010
Author: rashadkm
Date: 2010-04-21 08:38:22 -0400 (Wed, 21 Apr 2010)
New Revision: 41950
Modified:
grass-addons/gui/wxpython/data_catalog/LayerTree.py
Log:
fixed display for different location and mapsets
Modified: grass-addons/gui/wxpython/data_catalog/LayerTree.py
===================================================================
--- grass-addons/gui/wxpython/data_catalog/LayerTree.py 2010-04-21 12:37:36 UTC (rev 41949)
+++ grass-addons/gui/wxpython/data_catalog/LayerTree.py 2010-04-21 12:38:22 UTC (rev 41950)
@@ -344,9 +344,26 @@
mapframe.maptree.AddLayer(ltype="vector", lname=self.mapname, lchecked=True,lcmd=self.cmd)
l_type="vector"
#self.infocmd = ["r.info", str(self.mapname)]
+
+ self.maplayer = mapframe.Map.AddLayer(type=l_type, name=self.mapname, command=self.cmd)
+
+ #mapframe.maptree.AddLayer(ltype="raster", lname=self.mapname, lchecked=True,lcmd=self.cmd)
+ maptree.ltype = 'vector'
+ mapframe.Map.region = mapframe.Map.GetRegion()
+ mapframe.MapWindow2D.flag = True
+ mapframe.MapWindow2D.UpdateMap(render=True)
+ mapframe.MapWindow2D.flag = False
+ layer = maptree.PrependItem(parent=maptree.root, text=self.mapname, ct_type=1)
+ maptree.first = True
+ maptree.layer_selected = layer
+ maptree.CheckItem(layer)
+ #self.layer.append(self.maplayer)
+ maptree.PlusLayer(self.maplayer)
+
+
# if self.cmd:
# mapframe.Map.Clean()
# mapframe.Map.__init__() #to update projection and region
More information about the grass-commit
mailing list