浏览代码

wxNviz: fix weird vector rendering on Mac in https://trac.osgeo.org/grass/ticket/2381 (merge from trunk, https://trac.osgeo.org/grass/changeset/61477)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@61478 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 年之前
父节点
当前提交
c021b9fb8f
共有 1 个文件被更改,包括 4 次插入5 次删除
  1. 4 5
      gui/wxpython/nviz/mapwindow.py

+ 4 - 5
gui/wxpython/nviz/mapwindow.py

@@ -80,17 +80,16 @@ class GLWindow(MapWindowBase, glcanvas.GLCanvas):
         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)
-
-        glcanvas.GLCanvas.__init__(self, parent, id, attribList=attribs)
+            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)
 
         MapWindowBase.__init__(self, parent=parent, giface=giface, Map=Map)
         self.Hide()