Browse 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á 11 years ago
parent
commit
513147bf5f
1 changed files with 2 additions and 1 deletions
  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]