Browse Source

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 years ago
parent
commit
aabbb7a81c
1 changed files with 2 additions and 1 deletions
  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.imagedict = {} # images and their PseudoDC ID's for painting and dragging
         
         
         self.pdc = wx.PseudoDC()
         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
         # make sure that extents are updated at init
         self.Map.region = self.Map.GetRegion()
         self.Map.region = self.Map.GetRegion()