mirror of
https://github.com/bec-project/bec_widgets.git
synced 2025-07-13 19:21:50 +02:00
fix(device_input): remove unnecessary lowercase conversion for device selection
This commit is contained in:
@ -397,7 +397,7 @@ class DeviceInputBase(BECWidget):
|
|||||||
object: Device object, can be device of type Device, Positioner, Signal or ComputedSignal.
|
object: Device object, can be device of type Device, Positioner, Signal or ComputedSignal.
|
||||||
"""
|
"""
|
||||||
self.validate_device(device)
|
self.validate_device(device)
|
||||||
dev = getattr(self.dev, device.lower(), None)
|
dev = getattr(self.dev, device, None)
|
||||||
if dev is None:
|
if dev is None:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
f"Device {device} is not found in the device manager {self.dev} as enabled device."
|
f"Device {device} is not found in the device manager {self.dev} as enabled device."
|
||||||
|
@ -250,7 +250,7 @@ class DeviceSignalInputBase(BECWidget):
|
|||||||
object: Device object, can be device of type Device, Positioner, Signal or ComputedSignal.
|
object: Device object, can be device of type Device, Positioner, Signal or ComputedSignal.
|
||||||
"""
|
"""
|
||||||
self.validate_device(device)
|
self.validate_device(device)
|
||||||
dev = getattr(self.dev, device.lower(), None)
|
dev = getattr(self.dev, device, None)
|
||||||
if dev is None:
|
if dev is None:
|
||||||
logger.warning(f"Device {device} not found in devicemanager.")
|
logger.warning(f"Device {device} not found in devicemanager.")
|
||||||
return None
|
return None
|
||||||
|
@ -140,7 +140,7 @@ class DeviceComboBox(DeviceInputBase, QComboBox):
|
|||||||
"""
|
"""
|
||||||
if self.validate_device(input_text) is True:
|
if self.validate_device(input_text) is True:
|
||||||
self._is_valid_input = True
|
self._is_valid_input = True
|
||||||
self.device_selected.emit(input_text.lower())
|
self.device_selected.emit(input_text)
|
||||||
else:
|
else:
|
||||||
self._is_valid_input = False
|
self._is_valid_input = False
|
||||||
self.update()
|
self.update()
|
||||||
|
@ -147,7 +147,7 @@ class DeviceLineEdit(DeviceInputBase, QLineEdit):
|
|||||||
"""
|
"""
|
||||||
if self.validate_device(input_text) is True:
|
if self.validate_device(input_text) is True:
|
||||||
self._is_valid_input = True
|
self._is_valid_input = True
|
||||||
self.device_selected.emit(input_text.lower())
|
self.device_selected.emit(input_text)
|
||||||
else:
|
else:
|
||||||
self._is_valid_input = False
|
self._is_valid_input = False
|
||||||
self.update()
|
self.update()
|
||||||
|
Reference in New Issue
Block a user