Skip to content

Commit

Permalink
Prevent already destroyed widget exception occurring on Slicer exit
Browse files Browse the repository at this point in the history
This commit avoid the exception reported below from happening when
exiting Slicer:

Exception ValueError: "Trying to call 'deleteLater' on a destroyed qMRMLNodeComboBox object" in <bound method FilterParameters.__del__ of <SimpleFilters.FilterParameters object at 0x5a13390>> 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.
  • Loading branch information
jcfr committed May 12, 2015
1 parent 625d941 commit 32f2a1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SimpleFilters/SimpleFilters.py
Expand Up @@ -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)
Expand Down

0 comments on commit 32f2a1b

Please sign in to comment.