[GRASS-SVN] r48394 - grass-addons/grass7/gui/wxpython/wx.wms
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Sep 21 07:58:54 EDT 2011
Author: sudeepsingh
Date: 2011-09-21 04:58:53 -0700 (Wed, 21 Sep 2011)
New Revision: 48394
Modified:
grass-addons/grass7/gui/wxpython/wx.wms/addserver.py
grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py
Log:
Layer Selection modified, now layers are not selected recursively, one by one selection used
Modified: grass-addons/grass7/gui/wxpython/wx.wms/addserver.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.wms/addserver.py 2011-09-21 09:55:36 UTC (rev 48393)
+++ grass-addons/grass7/gui/wxpython/wx.wms/addserver.py 2011-09-21 11:58:53 UTC (rev 48394)
@@ -56,7 +56,7 @@
self.ServerNameText = wx.TextCtrl(self, -1, "")
self.URL = wx.StaticText(self, -1, " URL*")
self.URLText = wx.TextCtrl(self, -1, "")
- self.Username = wx.StaticText(self, -1, " Username*")
+ self.Username = wx.StaticText(self, -1, " Username")
self.UsernameText = wx.TextCtrl(self, -1, "")
self.Password = wx.StaticText(self, -1, " Password")
self.PasswordText = wx.TextCtrl(self, -1, "", style=wx.TE_PASSWORD)
Modified: grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py 2011-09-21 09:55:36 UTC (rev 48393)
+++ grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py 2011-09-21 11:58:53 UTC (rev 48394)
@@ -151,19 +151,27 @@
return
currentLayerDetails = LayerTree.GetItemText(nodeId)
+ print currentLayerDetails
if(not(currentLayerDetails == 'Layers' and currentLayerDetails.count(':')==0)):
currentLayerName = (currentLayerDetails.split(':')[0]).split('-')[1]
+ print 'name = ' + currentLayerName
currentLayerKey = (currentLayerDetails.split(':')[0]).split('-')[0]
+ print 'key = ' + currentLayerKey
if(not currentLayerKey in parent.selectedLayersKeys):
parent.selectedLayersKeys += [currentLayerKey]
- if(parent.layerDataDict1[currentLayerKey].queryable == 1):
+ print 'selected layers = '
+ print parent.selectedLayersKeys
+ print 'queryable = '
+ print int(parent.layerDataDict1[currentLayerKey].queryable)
+ if(int(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)
+ print 'layersString = ' + parent.layersString
+ #allChild = self.getAllChild(LayerTree, nodeId)
+ #for child in allChild:
+ # self.layerTreeItemDFS(parent,LayerTree,child)
class wmsFrame(wx.Frame):
def __init__(self, *args, **kwds):
@@ -499,7 +507,7 @@
def OnLayerTreeSelChanged(self, event): # wxGlade: wmsFrame.<event_handler>"
"""
- @description: called on selection of a layer from self.LayerTree. Sets self.selectedURL variable.
+ @description: called on selection of a layer from self.LayerTree. Sets self.layerName variable.
@todo:None
@param self: reference variable
@param event: event associated.
@@ -526,6 +534,30 @@
#print self.layerDataDict1
self.selectedEPSG = None
event.Skip()
+ '''
+ for sellayer in self.LayerTree.GetSelections():
+ layerNameString = self.LayerTree.GetItemText(sellayer)
+ layerNameStringList = layerNameString.split(':')
+ if(len(layerNameStringList)==0):
+ message = 'Unable to select layers'
+ self.ShowMessage(message, 'Warning')
+ grass.warning(message)
+ StatusBar_fields = [message]
+ self.StatusBar.SetStatusText(StatusBar_fields[0], 0)
+ return
+ layerName = layerNameStringList[0].split('-')[1]
+ key = layerNameStringList[0].split('-')[0]
+ self.selectedLayerList += [layerName]
+ self.layerName += ","+layerName
+ keys += [key]
+ lEPSG = self.keyToEPSGCodes[key]
+ self.epsgList.Append('<'+layerName+'>')
+ self.epsgList.AppendItems(lEPSG)
+
+
+ self.layerName = self.layerName[1:]
+ print self.layerName
+ self.selectedEPSG = None'''
def OnAddServer(self, event): # wxGlade: wmsFrame.<event_handler>
"""
More information about the grass-commit
mailing list