瀏覽代碼

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 年之前
父節點
當前提交
5a4e98c94d
共有 1 個文件被更改,包括 2 次插入1 次删除
  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()")
         Debug.msg(5, "AnimationWindow.Draw()")
 
 
         dc.Clear()  # make sure you clear the bitmap!
         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):
     def OnSize(self, event):
         Debug.msg(5, "AnimationWindow.OnSize()")
         Debug.msg(5, "AnimationWindow.OnSize()")