[GRASS-SVN] r47985 - grass-addons/grass7/gui/wxpython/wx.wms
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 30 13:58:19 EDT 2011
Author: sudeepsingh
Date: 2011-08-30 10:58:19 -0700 (Tue, 30 Aug 2011)
New Revision: 47985
Modified:
grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py
Log:
Hierarchial Layer Display, Stable version, some modifications to be done
Modified: grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py 2011-08-30 17:10:05 UTC (rev 47984)
+++ grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py 2011-08-30 17:58:19 UTC (rev 47985)
@@ -104,13 +104,16 @@
return
currentLayerDetails = LayerTree.GetItemText(nodeId)
- currentLayerName = (currentLayerDetails.split(':')[0]).split('-')[1]
- currentLayerKey = (currentLayerDetails.split(':')[0]).split('-')[0]
- if(parent.layerDataDict1[currentLayerKey].queryable == 1):
- parent.epsgList.Append('<'+currentLayerName+'>')
- listEPSG = parent.layerDataDict1[currentLayerKey].srsList
- parent.epsgList.AppendItems(listEPSG)
- parent.layersString += ',' + currentLayerName
+ if(not(currentLayerDetails == 'Layers' and currentLayerDetails.count(':')==0)):
+ currentLayerName = (currentLayerDetails.split(':')[0]).split('-')[1]
+ currentLayerKey = (currentLayerDetails.split(':')[0]).split('-')[0]
+ if(not currentLayerKey in parent.selectedLayersKeys):
+ parent.selectedLayersKeys += [currentLayerKey]
+ if(parent.layerDataDict1[currentLayerKey].queryable == 1):
+ parent.epsgList.Append('<'+currentLayerName+'>')
+ listEPSG = parent.layerDataDict1[currentLayerKey].srsList
+ parent.epsgList.AppendItems(listEPSG)
+ parent.layersString += ',' + currentLayerName
allChild = self.getAllChild(LayerTree, nodeId)
for child in allChild:
self.layerTreeItemDFS(parent,LayerTree,child)
@@ -429,6 +432,7 @@
res = ''
self.layersString=''
manageLT = ManageLayerTree()
+ self.selectedLayersKeys = []
for sellayer in self.LayerTree.GetSelections():
#res = res + ','+self.LayerTree.GetItemText(sellayer)
manageLT.layerTreeItemDFS(self,self.LayerTree, sellayer)
More information about the grass-commit
mailing list