浏览代码

wxGUI/histogram: properly initialize bitmap

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

+ 2 - 1
gui/wxpython/modules/histogram.py

@@ -74,7 +74,8 @@ class BufferedWindow(wx.Window):
         self.imagedict = {} # images and their PseudoDC ID's for painting and dragging
         
         self.pdc = wx.PseudoDC()
-        self._buffer = '' # will store an off screen empty bitmap for saving to file
+        # will store an off screen empty bitmap for saving to file
+        self._buffer = wx.EmptyBitmap(max(1, self.Map.width), max(1, self.Map.height))
         
         # make sure that extents are updated at init
         self.Map.region = self.Map.GetRegion()