fix setPlayRate() on running MetaInterval

This commit is contained in:
David Rose 2010-05-19 12:28:17 +00:00
parent d4263a47aa
commit be3a0f3520
1 changed files with 13 additions and 0 deletions

View File

@ -460,6 +460,19 @@ class MetaInterval(CMetaInterval):
else:
self.notify.error("Cannot build list from MetaInterval directly.")
def setPlayRate(self, playRate):
""" Changes the play rate of the interval. If the interval is
already started, this changes its speed on-the-fly. Note that
since playRate is a parameter to start() and loop(), the next
call to start() or loop() will reset this parameter. """
if self.isPlaying():
self.pause()
CMetaInterval.setPlayRate(self, playRate)
self.resume()
else:
CMetaInterval.setPlayRate(self, playRate)
def __doPythonCallbacks(self):
# This function invokes any Python-level Intervals that need
# to be invoked at this point in time. It must be called