[GRASS-SVN] r65213 - in grass/trunk/gui/wxpython: core mapwin

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 10 12:52:26 PDT 2015


Author: martinl
Date: 2015-05-10 12:52:26 -0700 (Sun, 10 May 2015)
New Revision: 65213

Modified:
   grass/trunk/gui/wxpython/core/render.py
   grass/trunk/gui/wxpython/mapwin/buffered.py
Log:
wxGUI: partly re-enable layerChanged events (rendering in threads, work in progress)

Modified: grass/trunk/gui/wxpython/core/render.py
===================================================================
--- grass/trunk/gui/wxpython/core/render.py	2015-05-10 12:16:54 UTC (rev 65212)
+++ grass/trunk/gui/wxpython/core/render.py	2015-05-10 19:52:26 UTC (rev 65213)
@@ -1215,9 +1215,10 @@
         if render and not layer.Render():
             raise GException(_("Unable to render map layer <%s>.") %
                              layer.GetName())
+
+        # not needed since there is self.forceRender
+        ### self.layerChanged(layer=layer)
         
-        self.layerChanged(layer=layer)
-        
         return layer
 
     def ChangeOpacity(self, layer, opacity):

Modified: grass/trunk/gui/wxpython/mapwin/buffered.py
===================================================================
--- grass/trunk/gui/wxpython/mapwin/buffered.py	2015-05-10 12:16:54 UTC (rev 65212)
+++ grass/trunk/gui/wxpython/mapwin/buffered.py	2015-05-10 19:52:26 UTC (rev 65213)
@@ -180,8 +180,7 @@
         self.Bind(wx.EVT_ERASE_BACKGROUND, lambda x:None)
 
         # rerender when Map reports change
-        ### Not needed when using RenderMapMgr
-        # self.Map.layerChanged.connect(self.OnUpdateMap)
+        self.Map.layerChanged.connect(self.OnUpdateMap)
         self.Map.GetRenderMgr().renderDone.connect(self._updateMFinished)
         
         # vars for handling mouse clicks
@@ -198,15 +197,11 @@
 
     def DisactivateWin(self):
         """Use when the class instance is hidden in MapFrame."""
-        ### Not needed when using RenderMapMgr
-        # self.Map.layerChanged.disconnect(self.OnUpdateMap)\
-        pass
+        self.Map.layerChanged.disconnect(self.OnUpdateMap)
     
     def ActivateWin(self):
         """Used when the class instance is activated in MapFrame."""
-        ### Not needed when using RenderMapMgr
-        # self.Map.layerChanged.connect(self.OnUpdateMap)
-        pass
+        self.Map.layerChanged.connect(self.OnUpdateMap)
         
     def _definePseudoDC(self):
         """Define PseudoDC objects to use



More information about the grass-commit mailing list