소스 검색

wxGUI/animation: fix crash with wxPython 3 when starting with parameter (merge from trunk, https://trac.osgeo.org/grass/changeset/64665)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@64666 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 년 전
부모
커밋
1614a1f502
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      gui/wxpython/animation/g.gui.animation.py

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

@@ -128,7 +128,8 @@ def main():
     frame.CentreOnScreen()
     frame.Show()
     if len(layerList) >= 1:
-        frame.SetAnimations([layerList] + [None] * (MAX_COUNT - 1))
+        # CallAfter added since it was crashing with wxPython 3 gtk
+        wx.CallAfter(frame.SetAnimations, [layerList] + [None] * (MAX_COUNT - 1))
     app.MainLoop()
 
 if __name__ == '__main__':