0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-13 19:21:50 +02:00

fix(plot_base): fix cleanup of popups if popups are still open when PlotBase is closed

This commit is contained in:
2025-02-27 18:00:31 +01:00
parent 89e8ebf1b6
commit 81f61f3c3b

View File

@ -95,6 +95,7 @@ class PlotBase(BECWidget, QWidget):
self.entry_validator = EntryValidator(self.dev)
# Base widgets elements
self._popups = popups
self._ui_mode = UIMode.POPUP if popups else UIMode.SIDE
self.axis_settings_dialog = None
self.plot_widget = pg.GraphicsLayoutWidget(parent=self)
@ -699,6 +700,9 @@ class PlotBase(BECWidget, QWidget):
def cleanup(self):
self.unhook_crosshair()
self.unhook_fps_monitor(delete_label=True)
if self.axis_settings_dialog is not None:
self.axis_settings_dialog.close()
self.axis_settings_dialog = None
self.cleanup_pyqtgraph()
self.rpc_register.remove_rpc(self)