[GRASS-SVN] r32873 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 18 18:26:11 EDT 2008


Author: martinl
Date: 2008-08-18 18:26:11 -0400 (Mon, 18 Aug 2008)
New Revision: 32873

Modified:
   grass/trunk/gui/wxpython/gui_modules/mapdisp.py
   grass/trunk/gui/wxpython/gui_modules/render.py
Log:
wxGUI: quick fix for wx.SafeYield() to avoid flickering (better use wxApp.Yield)
[merge from devbr6, r32872]


Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2008-08-18 22:16:54 UTC (rev 32872)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2008-08-18 22:26:11 UTC (rev 32873)
@@ -2399,6 +2399,7 @@
 
         self.gismanager = gismgr    # GIS Manager object
         self.Map        = Map       # instance of render.Map
+        self.Map.window = self
         self.tree       = tree      # GIS Manager layer tree object
         self.page       = page      # Notebook page holding the layer tree
         self.layerbook  = notebook  # GIS Manager layer tree notebook

Modified: grass/trunk/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/render.py	2008-08-18 22:16:54 UTC (rev 32872)
+++ grass/trunk/gui/wxpython/gui_modules/render.py	2008-08-18 22:26:11 UTC (rev 32873)
@@ -318,7 +318,9 @@
     """
     Map composition (stack of map layers and overlays)
     """
-    def __init__(self, gisrc=None):
+    def __init__(self, gisrc=None, window=None):
+        self.window = window # used for wx.SafeYield()
+        
         # 
         # region/extent settigns
         #
@@ -833,7 +835,7 @@
             if mapWindow is not None:
                 mapWindow.onRenderCounter += 1
 
-            wx.SafeYield()
+            wx.SafeYield(self.window)
             
             # add image to compositing list
             if layer.type != "overlay":



More information about the grass-commit mailing list