summaryrefslogtreecommitdiff
path: root/ui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'ui/windows')
-rw-r--r--ui/windows/config_window.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/ui/windows/config_window.py b/ui/windows/config_window.py
index 34cc789..604b6ed 100644
--- a/ui/windows/config_window.py
+++ b/ui/windows/config_window.py
@@ -24,7 +24,7 @@ from PyQt6.QtWidgets import (
QDoubleSpinBox,
)
from PyQt6.QtCore import Qt, pyqtSignal, QTimer
-from PyQt6.QtGui import QCloseEvent, QColor
+from PyQt6.QtGui import QCloseEvent, QColor, QShowEvent
from devices.device_registry import DeviceRegistry
from core.acquisition import AcquisitionEngine
@@ -535,7 +535,16 @@ class ConfigWindow(QWidget):
if idx == 2:
self._plot_tab.refresh_channels()
- # ── Close ────────────────────────────────────────────────────────────────
+ # ── Show / Close ─────────────────────────────────────────────────────────
+
+ def showEvent(self, e: QShowEvent):
+ # closeEvent stops this poll; MainWindow reuses this same ConfigWindow
+ # instance across opens (doesn't recreate it), so without restarting
+ # here, reopening after a prior close leaves device status frozen at
+ # whatever it was at close time — e.g. stuck showing "Connecting…"
+ # for an async-connecting device like the motion capture camera.
+ self._dev_poll.start()
+ super().showEvent(e)
def closeEvent(self, e: QCloseEvent):
self._dev_poll.stop()