0
0
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:
2024-07-18 15:28:45 +02:00
parent e52ee2604c
commit d75c55b2b1

View File

@ -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()