[GRASS-SVN] r61478 - grass/branches/releasebranch_7_0/gui/wxpython/nviz

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 31 08:19:16 PDT 2014


Author: annakrat
Date: 2014-07-31 08:19:16 -0700 (Thu, 31 Jul 2014)
New Revision: 61478

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/nviz/mapwindow.py
Log:
wxNviz: fix weird vector rendering on Mac in #2381 (merge from trunk, r61477)

Modified: grass/branches/releasebranch_7_0/gui/wxpython/nviz/mapwindow.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/nviz/mapwindow.py	2014-07-31 15:13:28 UTC (rev 61477)
+++ grass/branches/releasebranch_7_0/gui/wxpython/nviz/mapwindow.py	2014-07-31 15:19:16 UTC (rev 61478)
@@ -80,18 +80,17 @@
         self.lmgr = lmgr
         self.frame = frame
 
-        attribs=[WX_GL_RGBA, WX_GL_DOUBLEBUFFER]
         # for wxGTK we need to set WX_GL_DEPTH_SIZE to draw vectors correctly
         # but we don't know the right value
         # in wxpython 2.9, there is IsDisplaySupported
         if CheckWxVersion(version=[2, 8, 11]) and \
            sys.platform not in ('win32', 'darwin'):
             depthBuffer = int(UserSettings.Get(group='display', key='nvizDepthBuffer', subkey='value'))
-            attribs.extend([WX_GL_DEPTH_SIZE, depthBuffer])
-        attribs.append(0)
+            attribs = [WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_DEPTH_SIZE, depthBuffer, 0]
+            glcanvas.GLCanvas.__init__(self, parent, id, attribList=attribs)
+        else:
+            glcanvas.GLCanvas.__init__(self, parent, id)
 
-        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