mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-03-05 00:12:49 +01: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