[GRASS-SVN] r61053 - grass/trunk/gui/wxpython/nviz
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Jun 29 03:25:49 PDT 2014
Author: hcho
Date: 2014-06-29 03:25:49 -0700 (Sun, 29 Jun 2014)
New Revision: 61053
Modified:
grass/trunk/gui/wxpython/nviz/mapwindow.py
Log:
nviz: Use double buffering to avoid flickering (ticket #2339)
Modified: grass/trunk/gui/wxpython/nviz/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/mapwindow.py 2014-06-29 10:23:06 UTC (rev 61052)
+++ grass/trunk/gui/wxpython/nviz/mapwindow.py 2014-06-29 10:25:49 UTC (rev 61053)
@@ -30,7 +30,7 @@
import wx
from wx.lib.newevent import NewEvent
from wx import glcanvas
-from wx.glcanvas import WX_GL_DEPTH_SIZE
+from wx.glcanvas import WX_GL_DEPTH_SIZE, WX_GL_DOUBLEBUFFER
import grass.script as grass
from grass.pydispatch.signal import Signal
@@ -86,11 +86,12 @@
if CheckWxVersion(version=[2, 8, 11]) and \
sys.platform not in ('win32', 'darwin'):
depthBuffer = int(UserSettings.Get(group='display', key='nvizDepthBuffer', subkey='value'))
- attribs=[WX_GL_DEPTH_SIZE, depthBuffer, 0]
- glcanvas.GLCanvas.__init__(self, parent, id, attribList=attribs)
+ attribs=[WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, depthBuffer, 0]
else:
- glcanvas.GLCanvas.__init__(self, parent, id)
+ attribs=[WX_GL_DOUBLEBUFFER, 0]
+ glcanvas.GLCanvas.__init__(self, parent, id, attribList=attribs)
+
MapWindowBase.__init__(self, parent=parent, giface=giface, Map=Map)
self.Hide()
More information about the grass-commit
mailing list