From 8efe3af8ba99c9b8933c8aa6f086db8c50255fc1 Mon Sep 17 00:00:00 2001 From: wyzula-jan Date: Tue, 25 Mar 2025 11:32:14 +0100 Subject: [PATCH] fix(waveform): error where scan history is empty --- 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 139ffb21..4ad260b9 100644 --- a/bec_widgets/widgets/plots/waveform/waveform.py +++ b/bec_widgets/widgets/plots/waveform/waveform.py @@ -1023,7 +1023,7 @@ class Waveform(PlotBase): ) x_data = self._get_x_data(device_name, device_entry) if x_data is not None: - if np.isscalar(x_data) and len(x_data) == 1: + if isinstance(x_data, int) or (np.isscalar(x_data) and np.size(x_data) == 1): self.clear_data() return if device_data is not None and x_data is not None: