From 32f2a1beb722827ba65c8d878772b055a8253804 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Mon, 11 May 2015 22:15:34 -0400 Subject: [PATCH] Prevent already destroyed widget exception occurring on Slicer exit This commit avoid the exception reported below from happening when exiting Slicer: Exception ValueError: "Trying to call 'deleteLater' on a destroyed qMRMLNodeComboBox object" in > ignored It is not required to explicitly delete the widgets associated with the last shown filter. The associated widgets have a parent and will be deleted by the application. --- SimpleFilters/SimpleFilters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SimpleFilters/SimpleFilters.py b/SimpleFilters/SimpleFilters.py index 71a8aa7..281b28d 100644 --- a/SimpleFilters/SimpleFilters.py +++ b/SimpleFilters/SimpleFilters.py @@ -541,7 +541,7 @@ def __init__(self, parent=None): self.outputLabelMapBox = None def __del__(self): - self.destroy() + self.widgets = [] def BeautifyCamelCase(self, str): return self.reCamelCase.sub(r' \1',str)