Forráskód Böngészése

wxGUI: quick fix for wx.SafeYield() to avoid flickering (better use wxApp.Yield)
[merge from devbr6, r32872]


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32873 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 éve
szülő
commit
600c586029

+ 1 - 0
gui/wxpython/gui_modules/mapdisp.py

@@ -2399,6 +2399,7 @@ class MapFrame(wx.Frame):
 
         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

+ 4 - 2
gui/wxpython/gui_modules/render.py

@@ -318,7 +318,9 @@ class Map(object):
     """
     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 @@ class Map(object):
             if mapWindow is not None:
                 mapWindow.onRenderCounter += 1
 
-            wx.SafeYield()
+            wx.SafeYield(self.window)
             
             # add image to compositing list
             if layer.type != "overlay":