Merge pull request #946 from RobinD42/throbber-issue924

Ensure the sequence attribute is a list by default
(cherry picked from commit c706dfacd9)
This commit is contained in:
Robin Dunn
2018-07-30 21:35:03 -07:00
parent 98fb3125eb
commit cd3de22068
3 changed files with 5 additions and 5 deletions

View File

@@ -84,6 +84,9 @@ Changes in this release include the following:
* Improve calltip stability in pyshell. (#941)
* Fix TypeError in wx.lib.throbber. (#924)
4.0.3 "The show must go on. (Die show-stoppers! Die!)"

View File

@@ -46,10 +46,7 @@ class TestPanel(wx.Panel):
throb.Throbber(self, -1, images, frameDelay = 0.1, reverse = True)
seq = self.throbbers['autoreverse']['throbber'].sequence
if isinstance(seq, range):
seq = list(seq).append(0)
else:
seq.append(0)
seq.append(0)
self.throbbers['label']['throbber'] = \
throb.Throbber(self, -1, images, frameDelay = 0.1, label = 'Label')

View File

@@ -333,7 +333,7 @@ class Throbber(wx.Panel):
#FIXME: need to make sure values are within range!!!
self.sequence = sequence
else:
self.sequence = range(self.frames)
self.sequence = list(range(self.frames))
if running:
self.Start()