Explorar o código

wxGUI/animation: fix crash with wxPython 3 when starting with parameter

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@64665 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová %!s(int64=10) %!d(string=hai) anos
pai
achega
764ff6a4d2
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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.CentreOnScreen()
     frame.Show()
     frame.Show()
     if len(layerList) >= 1:
     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()
     app.MainLoop()
 
 
 if __name__ == '__main__':
 if __name__ == '__main__':