Parcourir la source

wxGUI/animation: fix PyAssertionError on Windows

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@57959 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová il y a 11 ans
Parent
commit
513147bf5f
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      gui/wxpython/animation/dialogs.py

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

@@ -614,7 +614,8 @@ class EditDialog(wx.Dialog):
         self.listbox.Clear()
         for anim in self.animationData:
             self.listbox.Append(anim.name, clientData = anim)
-        self.listbox.SetSelection(0)
+        if self.animationData:
+            self.listbox.SetSelection(0)
 
     def _getNextIndex(self):
         indices = [anim.windowIndex for anim in self.animationData]