[GRASS-SVN] r41975 - grass-addons/gui/wxpython/data_catalog
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Apr 22 06:54:32 EDT 2010
Author: rashadkm
Date: 2010-04-22 06:54:30 -0400 (Thu, 22 Apr 2010)
New Revision: 41975
Modified:
grass-addons/gui/wxpython/data_catalog/LayerTree.py
grass-addons/gui/wxpython/data_catalog/catalog.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-22 10:13:28 UTC (rev 41974)
+++ grass-addons/gui/wxpython/data_catalog/LayerTree.py 2010-04-22 10:54:30 UTC (rev 41975)
@@ -344,26 +344,9 @@
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
Modified: grass-addons/gui/wxpython/data_catalog/catalog.py
===================================================================
--- grass-addons/gui/wxpython/data_catalog/catalog.py 2010-04-22 10:13:28 UTC (rev 41974)
+++ grass-addons/gui/wxpython/data_catalog/catalog.py 2010-04-22 10:54:30 UTC (rev 41975)
@@ -603,11 +603,14 @@
maptree.root = maptree.AddRoot("Map Layers")
maptree.SetPyData(maptree.root, (None,None))
for i in range(0,len(maptree.layer)):
+
maptree.Map.DeleteLayer(maptree.layer[i])
maptree.mapdict[str(maptree.layer[i].name)]=maptree.layer[i].type
+ #page.MapWindow2D.EraseMap()
+
self.mapfile.append(maptree.layer[i].name)
- self.oldpage.MapWindow2D.EraseMap()
+# self.oldpage.MapWindow2D.EraseMap()
print maptree.mapdict
@@ -671,8 +674,7 @@
self.cmd= ['d.vect', str("map=" + self.mapname)]
layer = maptree.PrependItem(parent=maptree.root, text=self.mapname, ct_type=1)
- page.MapWindow2D.flag = True
- page.MapWindow2D.UpdateMap(render=True)
+
#page.MapWindow2D.flag = False
maptree.first = True
maptree.layer_selected = layer
@@ -682,14 +684,18 @@
# try:
- maptree.Map.AddLayer(type=l_type, name=self.mapname, command=self.cmd)
+ maptree.Map.AddLayer(type=l_type, name=self.mapname, command=self.cmd)
+ page.MapWindow2D.flag = True
+ page.MapWindow2D.UpdateMap(render=True)
+ page.MapWindow2D.flag = False
+ maptree.Map.region = self.page.maptree.Map.GetRegion()
# except:
# pass
#mapframe.maptree.AddLayer(ltype="raster", lname=self.mapname, lchecked=True,lcmd=self.cmd)
- maptree.Map.region = self.page.maptree.Map.GetRegion()
+
#page.MapWindow2D.flag = False
@@ -2167,8 +2173,10 @@
#gc.set_debug(gc.DEBUG_LEAK)
#print gc.garbage
#gc.collect()
+
g_catalog = CatalogApp(0)
+
g_catalog.MainLoop()
#sys.exit(0)
More information about the grass-commit
mailing list