mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-14 03:31:50 +02:00
fix(dock): added hasattr to cleanup method for widgets
This commit is contained in:
@ -237,7 +237,8 @@ class BECDock(BECWidget, Dock):
|
||||
Clean up the dock, including all its widgets.
|
||||
"""
|
||||
for widget in self.widgets:
|
||||
widget.cleanup()
|
||||
if hasattr(widget, "cleanup"):
|
||||
widget.cleanup()
|
||||
self.widgets.clear()
|
||||
super().cleanup()
|
||||
|
||||
|
Reference in New Issue
Block a user