mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-13 19:21:50 +02:00
feat(device combobox): emit reset event if validation fails
This commit is contained in:
@ -34,6 +34,7 @@ class DeviceComboBox(DeviceInputBase, QComboBox):
|
|||||||
PLUGIN = True
|
PLUGIN = True
|
||||||
|
|
||||||
device_selected = Signal(str)
|
device_selected = Signal(str)
|
||||||
|
device_reset = Signal()
|
||||||
device_config_update = Signal()
|
device_config_update = Signal()
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -147,6 +148,7 @@ class DeviceComboBox(DeviceInputBase, QComboBox):
|
|||||||
self.device_selected.emit(input_text)
|
self.device_selected.emit(input_text)
|
||||||
else:
|
else:
|
||||||
self._is_valid_input = False
|
self._is_valid_input = False
|
||||||
|
self.device_reset.emit()
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
def validate_device(self, device: str) -> bool: # type: ignore[override]
|
def validate_device(self, device: str) -> bool: # type: ignore[override]
|
||||||
|
Reference in New Issue
Block a user