[GRASS-SVN] r44548 - in grass/branches/develbranch_6/gui/wxpython:
. gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Dec 6 16:00:34 EST 2010
Author: martinl
Date: 2010-12-06 13:00:34 -0800 (Mon, 06 Dec 2010)
New Revision: 44548
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/ogc_services.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
grass/branches/develbranch_6/gui/wxpython/wxgui.py
Log:
wxGUI: various minor fixes (wms, digitizer)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/ogc_services.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/ogc_services.py 2010-12-06 20:10:59 UTC (rev 44547)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/ogc_services.py 2010-12-06 21:00:34 UTC (rev 44548)
@@ -178,10 +178,13 @@
self.list.LoadData()
self.btn_import.Enable(False)
return # no layers found
-
+
lastLayer = lastStyle = ''
for line in ret.splitlines():
- key, value = line.split(':', 1)
+ try:
+ key, value = line.split(':', 1)
+ except ValueError:
+ continue
key = key.strip().lower()
value = value.strip()
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py 2010-12-06 20:10:59 UTC (rev 44547)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py 2010-12-06 21:00:34 UTC (rev 44548)
@@ -1308,8 +1308,8 @@
except gcmd.GException, e:
self.mapLayer = None
self.StopEditing()
- GError(parent = self.parent,
- message = e)
+ gcmd.GError(parent = self.parent,
+ message = str(e))
return False
self.parent.digit.SetMapName(mapLayer.GetName())
Modified: grass/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py 2010-12-06 20:10:59 UTC (rev 44547)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py 2010-12-06 21:00:34 UTC (rev 44548)
@@ -1050,20 +1050,27 @@
cmd = ['r.in.wms',
'mapserver=%s' % dlg.GetSettings()['server'],
'layers=%s' % layer,
- 'output=%s' % layer]
+ 'output=%s' % layer,
+ 'format=png',
+ '--overwrite']
styles = ','.join(layers[layer])
if styles:
cmd.append('styles=%s' % styles)
self.goutput.RunCmd(cmd, switchPage = True)
+
+ self.curr_page.maptree.AddLayer(ltype = 'raster',
+ lname = layer,
+ lcmd = ['d.rast', 'map=%s' % layer],
+ multiple = False)
else:
self.goutput.WriteWarning(_("Nothing to import. No WMS layer selected."))
-
+
+
dlg.Destroy()
def OnShowAttributeTable(self, event):
+ """!Show attribute table of the given vector map layer
"""
- Show attribute table of the given vector map layer
- """
if not self.curr_page:
self.MsgNoLayerSelected()
return
More information about the grass-commit
mailing list