From b47ae8f9175baf3629defecda0939036805471b0 Mon Sep 17 00:00:00 2001 From: wyzula-jan Date: Tue, 12 May 2026 20:16:24 +0200 Subject: [PATCH] wip scan group box correct filter --- bec_widgets/widgets/control/scan_control/scan_group_box.py | 7 +------ tests/unit_tests/test_scan_control.py | 4 +++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/bec_widgets/widgets/control/scan_control/scan_group_box.py b/bec_widgets/widgets/control/scan_control/scan_group_box.py index e9c746e8..09218ac2 100644 --- a/bec_widgets/widgets/control/scan_control/scan_group_box.py +++ b/bec_widgets/widgets/control/scan_control/scan_group_box.py @@ -272,16 +272,11 @@ class ScanGroupBox(QGroupBox): if default == "_empty": default = None if widget_class is DeviceComboBox: - device_filter = ( - BECDeviceFilter.POSITIONER - if item["type"] == ScanArgType.DEVICE - else BECDeviceFilter.DEVICE - ) widget = widget_class( parent=self.parent(), arg_name=arg_name, default=default, - device_filter=device_filter, + device_filter=BECDeviceFilter.DEVICE, ) else: widget = widget_class(parent=self.parent(), arg_name=arg_name, default=default) diff --git a/tests/unit_tests/test_scan_control.py b/tests/unit_tests/test_scan_control.py index df90921a..cae4811c 100644 --- a/tests/unit_tests/test_scan_control.py +++ b/tests/unit_tests/test_scan_control.py @@ -308,7 +308,9 @@ def test_on_scan_selected(scan_control, scan_name): if isinstance(widget, DeviceComboBox): assert widget.currentText() == "" assert "samx" in widget.devices - assert "bpm3a" not in widget.devices + assert ( + "async_device" in widget.devices + ) # async device should also be present in the device list # Check kwargs boxes kwargs_group = [param for param in expected_scan_info["gui_config"]["kwarg_groups"]]