wip no queued connection

This commit is contained in:
2026-05-20 18:31:42 +02:00
parent 5f0d1c3f43
commit 01b5ba8df4
2 changed files with 10 additions and 8 deletions
@@ -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()