mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-06-05 12:58:40 +02:00
wip no queued connection
This commit is contained in:
@@ -219,9 +219,10 @@ class DeviceComboBox(BECWidget, QComboBox):
|
||||
self._callback_id = self.bec_dispatcher.client.callbacks.register(
|
||||
EventType.DEVICE_UPDATE, self.on_device_update
|
||||
)
|
||||
self.device_config_update.connect(
|
||||
self.update_devices_from_filters, Qt.ConnectionType.QueuedConnection
|
||||
)
|
||||
# self.device_config_update.connect(
|
||||
# self.update_devices_from_filters, Qt.ConnectionType.QueuedConnection
|
||||
# )
|
||||
self.device_config_update.connect(self.update_devices_from_filters)
|
||||
self.currentTextChanged.connect(self.check_validity)
|
||||
self.check_validity(self.currentText())
|
||||
|
||||
|
||||
@@ -141,9 +141,10 @@ class SignalComboBox(BECWidget, QComboBox):
|
||||
self._device_update_register = self.bec_dispatcher.client.callbacks.register(
|
||||
EventType.DEVICE_UPDATE, self.on_device_update
|
||||
)
|
||||
self.device_config_update.connect(
|
||||
self.update_signals_from_filters, Qt.ConnectionType.QueuedConnection
|
||||
)
|
||||
# self.device_config_update.connect(
|
||||
# self.update_signals_from_filters, Qt.ConnectionType.QueuedConnection
|
||||
# )
|
||||
self.device_config_update.connect(self.update_signals_from_filters)
|
||||
self.currentTextChanged.connect(self.on_text_changed)
|
||||
|
||||
self.set_filter(signal_filter or [Kind.hinted, Kind.normal, Kind.config])
|
||||
@@ -256,8 +257,8 @@ class SignalComboBox(BECWidget, QComboBox):
|
||||
|
||||
def on_device_update(self, action: str, content: dict) -> None:
|
||||
"""Refresh filters when BEC reports device configuration changes."""
|
||||
if getattr(self, "_destroyed", False):
|
||||
return
|
||||
# if getattr(self, "_destroyed", False):
|
||||
# return
|
||||
if action in ["add", "remove", "reload"]:
|
||||
self.device_config_update.emit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user