浏览代码

wxGUI: quick fix for PyAssertionError in SymbolButton on windows (merge from release branch, https://trac.osgeo.org/grass/changeset/51413)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@51414 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 13 年之前
父节点
当前提交
4997a16b87
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      gui/wxpython/gui_core/widgets.py

+ 3 - 1
gui/wxpython/gui_core/widgets.py

@@ -26,6 +26,7 @@ This program is free software under the GNU General Public License
 """
 
 import os
+import sys
 import string
 
 import wx
@@ -195,7 +196,8 @@ class SymbolButton(BitmapTextButton):
         elif usage == 'pause':
             self.DrawPause(dc, size)
 
-        buffer.SetMaskColour(maskColor)
+        if sys.platform != "win32":
+            buffer.SetMaskColour(maskColor)
         self.SetBitmapLabel(buffer)
         dc.SelectObject(wx.NullBitmap)