From 90a6f5184efbee4252e015a82aecd296749bcad3 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Tue, 14 Oct 2008 14:35:24 +0000 Subject: [PATCH 1/1] remove onSelectionChanged callbacks before deleting the configInstance["config"] item in the wizard to prevent calling them from a closed screen --- lib/python/Screens/Wizard.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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: -- 2.30.2