[GRASS-SVN] r44549 - in grass/trunk: gui/wxpython
gui/wxpython/gui_modules lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Dec 6 16:09:23 EST 2010
Author: martinl
Date: 2010-12-06 13:09:23 -0800 (Mon, 06 Dec 2010)
New Revision: 44549
Modified:
grass/trunk/gui/wxpython/gui_modules/ogc_services.py
grass/trunk/gui/wxpython/gui_modules/toolbars.py
grass/trunk/gui/wxpython/wxgui.py
grass/trunk/lib/gis/parser.c
Log:
wxGUI: various minor fixes (wms, digitizer)
(merge r44548 from devbr6)
Modified: grass/trunk/gui/wxpython/gui_modules/ogc_services.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/ogc_services.py 2010-12-06 21:00:34 UTC (rev 44548)
+++ grass/trunk/gui/wxpython/gui_modules/ogc_services.py 2010-12-06 21:09:23 UTC (rev 44549)
@@ -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/trunk/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/toolbars.py 2010-12-06 21:00:34 UTC (rev 44548)
+++ grass/trunk/gui/wxpython/gui_modules/toolbars.py 2010-12-06 21:09:23 UTC (rev 44549)
@@ -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
# update toolbar
Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py 2010-12-06 21:00:34 UTC (rev 44548)
+++ grass/trunk/gui/wxpython/wxgui.py 2010-12-06 21:09:23 UTC (rev 44549)
@@ -998,20 +998,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
Modified: grass/trunk/lib/gis/parser.c
===================================================================
--- grass/trunk/lib/gis/parser.c 2010-12-06 21:00:34 UTC (rev 44548)
+++ grass/trunk/lib/gis/parser.c 2010-12-06 21:09:23 UTC (rev 44549)
@@ -473,6 +473,12 @@
while (--argc) {
ptr = *(++argv);
+ if (strcmp(ptr, "help") == 0 ||
+ strcmp(ptr, "-help") == 0 || strcmp(ptr, "--help") == 0) {
+ G_usage();
+ exit(EXIT_SUCCESS);
+ }
+
/* Overwrite option */
if (strcmp(ptr, "--o") == 0 || strcmp(ptr, "--overwrite") == 0) {
st->overwrite = 1;
More information about the grass-commit
mailing list