[GRASS-SVN] r44550 - in grass/branches/releasebranch_6_4/gui/wxpython: . gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 6 16:11:31 EST 2010


Author: martinl
Date: 2010-12-06 13:11:31 -0800 (Mon, 06 Dec 2010)
New Revision: 44550

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/ogc_services.py
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py
   grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py
Log:
wxGUI: various minor fixes (wms, digitizer)
(merge r44548 from devbr6)


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/ogc_services.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/ogc_services.py	2010-12-06 21:09:23 UTC (rev 44549)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/ogc_services.py	2010-12-06 21:11:31 UTC (rev 44550)
@@ -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/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py	2010-12-06 21:09:23 UTC (rev 44549)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/toolbars.py	2010-12-06 21:11:31 UTC (rev 44550)
@@ -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/releasebranch_6_4/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py	2010-12-06 21:09:23 UTC (rev 44549)
+++ grass/branches/releasebranch_6_4/gui/wxpython/wxgui.py	2010-12-06 21:11:31 UTC (rev 44550)
@@ -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