From 5038ddb148fdff945fab8f8849b3a988afa198af Mon Sep 17 00:00:00 2001 From: Abhishek Nath Date: Fri, 17 Apr 2009 23:41:58 +0000 Subject: [PATCH] Fixed a crash that was caused when anim panel was closed during an animation. Added a help feature to RTM. --- direct/src/tkpanels/AnimPanel.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/direct/src/tkpanels/AnimPanel.py b/direct/src/tkpanels/AnimPanel.py index 6ceb59aa1a..0d027d1f79 100644 --- a/direct/src/tkpanels/AnimPanel.py +++ b/direct/src/tkpanels/AnimPanel.py @@ -332,7 +332,12 @@ class AnimPanel(AppShell): def resetAllToEnd(self): for actorControl in self.actorControlList: - actorControl.resetToEnd() + actorControl.resetToEnd() + + def destroy(self): + # First clean up + taskMgr.remove(self.id + '_UpdateTask') + AppShell.destroy(self) class ActorControl(Pmw.MegaWidget): def __init__(self, parent = None, **kw): @@ -561,12 +566,12 @@ class ActorControl(Pmw.MegaWidget): self.currT = self.currT + deltaT if fLoop and self.duration: # If its looping compute modulo - loopT = self.currT % self.duration + loopT = self.currT % self.duration self.goToT(loopT) else: if (self.currT > self.maxSeconds): # Clear this actor control from play list - self['animPanel'].playList.remove(self) + taskMgr.remove() else: self.goToT(self.currT) else: