[GRASS-SVN] r65212 - grass/trunk/gui/wxpython/core

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 10 05:16:54 PDT 2015


Author: martinl
Date: 2015-05-10 05:16:54 -0700 (Sun, 10 May 2015)
New Revision: 65212

Modified:
   grass/trunk/gui/wxpython/core/render.py
   grass/trunk/gui/wxpython/core/ws.py
Log:
wxGUI: fix RenderWMSMgr to work with RenderMapMgr


Modified: grass/trunk/gui/wxpython/core/render.py
===================================================================
--- grass/trunk/gui/wxpython/core/render.py	2015-05-10 11:31:25 UTC (rev 65211)
+++ grass/trunk/gui/wxpython/core/render.py	2015-05-10 12:16:54 UTC (rev 65212)
@@ -570,7 +570,7 @@
                 self.progressInfo['progresVal'] += 1
                 if layer in self.progressInfo['downloading']:
                     self.progressInfo['downloading'].remove(layer)
-
+        
         # for updating statusbar text
         stText = ''
         first = True
@@ -1124,9 +1124,10 @@
         self._addLayer(layer, render, pos)
         
         renderMgr = layer.GetRenderMgr()
+        Debug.msg(1, "Map.AddLayer(): ltype={}, command={}".format(ltype, ' '.join(command)))
         if renderMgr:
             if layer.type == 'wms':
-                renderMgr.dataFetched.connect(self.layerChanged)
+                renderMgr.dataFetched.connect(self.renderMgr.ReportProgress)
             renderMgr.updateProgress.connect(self.renderMgr.ReportProgress)
         
         self.layerAdded.emit(layer=layer)

Modified: grass/trunk/gui/wxpython/core/ws.py
===================================================================
--- grass/trunk/gui/wxpython/core/ws.py	2015-05-10 11:31:25 UTC (rev 65211)
+++ grass/trunk/gui/wxpython/core/ws.py	2015-05-10 12:16:54 UTC (rev 65212)
@@ -86,6 +86,9 @@
         if not haveGdal:
             return
 
+        Debug.msg(1, "RenderWMSMgr.Render(%s): force=%d img=%s" % \
+                  (self.layer, self.layer.forceRender, self.layer.mapfile))
+
         env = copy.copy(env)
         self.dstSize['cols'] = int(env["GRASS_RENDER_WIDTH"])
         self.dstSize['rows'] = int(env["GRASS_RENDER_HEIGHT"])
@@ -134,7 +137,8 @@
             env["GRASS_REGION"] = self._createRegionStr(region)
 
             self.thread.RunCmd(cmdList, env=env, stderr=self.cmdStdErr)
-
+            self.updateProgress.emit(layer=self.layer)
+            
     def OnCmdOutput(self, event):
         """Print cmd output according to debug level.
         """
@@ -171,7 +175,7 @@
 
         self.fetched_data_cmd = self.fetching_cmd
 
-        self.dataFetched.emit()
+        self.dataFetched.emit(layer=self.layer)
 
     def _getRegionDict(self, env):
         """Parse string from GRASS_REGION env variable into dict.



More information about the grass-commit mailing list