From ffc3aebffd498275296ab8fa57e99b67e8806899 Mon Sep 17 00:00:00 2001 From: appel_c Date: Tue, 15 Apr 2025 13:50:11 +0200 Subject: [PATCH] wip move processEvents before curves are resettet --- bec_widgets/widgets/plots/waveform/waveform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bec_widgets/widgets/plots/waveform/waveform.py b/bec_widgets/widgets/plots/waveform/waveform.py index 6d9f7d4e..3a7fcfcb 100644 --- a/bec_widgets/widgets/plots/waveform/waveform.py +++ b/bec_widgets/widgets/plots/waveform/waveform.py @@ -1167,12 +1167,12 @@ class Waveform(PlotBase): self.bec_dispatcher.disconnect_slot( self.on_async_readback, MessageEndpoints.device_async_readback(self.old_scan_id, name) ) + QApplication.processEvents() # Process events to avoid async callbacks scheduled but executed in the wrong order try: curve.clear_data() except KeyError: logger.warning(f"Curve {name} not found in plot item.") pass - QApplication.processEvents() # Process events to avoid async callbacks scheduled but executed in the wrong order self.bec_dispatcher.connect_slot( self.on_async_readback, MessageEndpoints.device_async_readback(self.scan_id, name),