From: Stefan Pluecken Date: Tue, 14 Oct 2008 14:35:24 +0000 (+0000) Subject: remove onSelectionChanged callbacks before deleting the configInstance["config"]... X-Git-Tag: 2.6.0~763 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/90a6f5184efbee4252e015a82aecd296749bcad3?hp=8507f07b91640a8f90694d724c8e16e71100eb61;ds=inline remove onSelectionChanged callbacks before deleting the configInstance["config"] item in the wizard to prevent calling them from a closed screen --- diff --git a/lib/python/Screens/Wizard.py b/lib/python/Screens/Wizard.py index 7c39b3e4..9f87ee31 100644 --- a/lib/python/Screens/Wizard.py +++ b/lib/python/Screens/Wizard.py @@ -302,7 +302,7 @@ class Wizard(Screen): if self.showConfig: if self.wizard[currStep]["config"]["type"] == "dynamic": eval("self." + self.wizard[currStep]["config"]["evaluation"])() - + if self.showList: if (len(self.wizard[currStep]["evaluatedlist"]) > 0): print "current:", self["list"].current @@ -401,7 +401,7 @@ class Wizard(Screen): self.resetCounter() if (self.showConfig and self.wizard[self.currStep]["config"]["screen"] != None): - self["config"].instance.moveSelection(self["config"].instance.moveUp) + self["config"].instance.moveSelection(self["config"].instance.moveUp) elif (self.showList and len(self.wizard[self.currStep]["evaluatedlist"]) > 0): if self.wizard[self.currStep].has_key("onselect"): self.selection = self["list"].current[-1] @@ -440,6 +440,8 @@ class Wizard(Screen): self.timeoutTimer.stop() if self.configInstance is not None: + # remove callbacks + self.configInstance["config"].onSelectionChanged = [] del self.configInstance["config"] self.configInstance.doClose() self.configInstance = None @@ -521,7 +523,9 @@ class Wizard(Screen): self.configInstance = self.session.instantiateDialog(self.wizard[self.currStep]["config"]["screen"], eval(self.wizard[self.currStep]["config"]["args"])) self["config"].l.setList(self.configInstance["config"].list) self.configInstance["config"].destroy() + print "clearConfigList", self.configInstance["config"], self["config"] self.configInstance["config"] = self["config"] + print "clearConfigList", self.configInstance["config"], self["config"] else: self["config"].l.setList([]) else: