mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 03:15:07 -04:00
AnimPanel Had no way of telling objects that it had been closed
This commit is contained in:
parent
33c56918d6
commit
518176f53f
@ -57,6 +57,8 @@ class AnimPanel(AppShell):
|
|||||||
|
|
||||||
# Execute option callbacks
|
# Execute option callbacks
|
||||||
self.initialiseoptions(AnimPanel)
|
self.initialiseoptions(AnimPanel)
|
||||||
|
# We need to know when AnimPanel is closed
|
||||||
|
self.destroyCallBack = None
|
||||||
|
|
||||||
def createInterface(self):
|
def createInterface(self):
|
||||||
# Handle to the toplevels interior
|
# Handle to the toplevels interior
|
||||||
@ -334,9 +336,14 @@ class AnimPanel(AppShell):
|
|||||||
for actorControl in self.actorControlList:
|
for actorControl in self.actorControlList:
|
||||||
actorControl.resetToEnd()
|
actorControl.resetToEnd()
|
||||||
|
|
||||||
|
def setDestroyCallBack(self, callBack):
|
||||||
|
self.destroyCallBack = callBack
|
||||||
|
|
||||||
def destroy(self):
|
def destroy(self):
|
||||||
# First clean up
|
# First clean up
|
||||||
taskMgr.remove(self.id + '_UpdateTask')
|
taskMgr.remove(self.id + '_UpdateTask')
|
||||||
|
self.destroyCallBack()
|
||||||
|
self.destroyCallBack = None
|
||||||
AppShell.destroy(self)
|
AppShell.destroy(self)
|
||||||
|
|
||||||
class ActorControl(Pmw.MegaWidget):
|
class ActorControl(Pmw.MegaWidget):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user