Kaynağa Gözat

wxGUI/animation: prevent drawing empty bitmap which causes problems with wxGTK3 (merge from trunk, https://trac.osgeo.org/grass/changeset/66375)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@66376 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 9 yıl önce
ebeveyn
işleme
5a4e98c94d
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      gui/wxpython/animation/mapwindow.py

+ 2 - 1
gui/wxpython/animation/mapwindow.py

@@ -122,7 +122,8 @@ class AnimationWindow(BufferedWindow):
         Debug.msg(5, "AnimationWindow.Draw()")
 
         dc.Clear()  # make sure you clear the bitmap!
-        dc.DrawBitmap(self.bitmap, x=self.x, y=self.y)
+        if self.bitmap.GetWidth() > 1:
+            dc.DrawBitmap(self.bitmap, x=self.x, y=self.y)
 
     def OnSize(self, event):
         Debug.msg(5, "AnimationWindow.OnSize()")