Bug on RefreshList in subindextable.py fixed
authorlbessard
Wed, 07 Nov 2007 07:46:14 +0100
changeset 312 70f96abd8ecd
parent 311 adf4a929cf8b
child 313 fed411af774a
Bug on RefreshList in subindextable.py fixed
objdictgen/subindextable.py
--- a/objdictgen/subindextable.py	Tue Oct 30 16:21:04 2007 +0100
+++ b/objdictgen/subindextable.py	Wed Nov 07 07:46:14 2007 +0100
@@ -548,7 +548,7 @@
                         else:
                             self.IndexChoice.Append(name)
                         self.ChoiceIndex.append(index)
-                if choiceindex != wx.NOT_FOUND and choice == self.IndexChoice.GetString(choiceindex):
+                if choiceindex != wx.NOT_FOUND and choiceindex < self.IndexChoice.GetCount() and choice == self.IndexChoice.GetString(choiceindex):
                     self.IndexChoice.SetStringSelection(choice)
         if self.Editable:
             self.IndexChoice.Enable(self.IndexChoice.GetCount() != 0)