fix finger gui cannot choose camera

This commit is contained in:
ykcheungab
2026-08-26 20:19:55 +08:00
parent 577e3fe528
commit 68910e63c1
15 changed files with 5 additions and 0 deletions
+1
View File
@@ -90,6 +90,7 @@ def main():
threshold=0.4, threshold=0.4,
grid_spacing=10, grid_spacing=10,
arrow_scale=1.0, arrow_scale=1.0,
valid_mask=tactile.valid_mask,
) )
cv2.imshow("UV Unrolled", arrows) cv2.imshow("UV Unrolled", arrows)
+2
View File
@@ -570,6 +570,8 @@ class FingerDashboardWindow(QMainWindow):
camera_id = str(camera_id).strip() camera_id = str(camera_id).strip()
if not camera_id: if not camera_id:
return return
# Explicit camera pick clears sticky file mode and persists the live source.
self.settings_panel.set_video_source(camera_id)
self.config.video = camera_id self.config.video = camera_id
self._save_preferences() self._save_preferences()
self._update_play_enabled_for_source() self._update_play_enabled_for_source()
@@ -110,6 +110,8 @@ class SettingsPanelWidget(QWidget):
self.camera_combo = QComboBox() self.camera_combo = QComboBox()
self.camera_combo.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) self.camera_combo.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
self.camera_combo.setToolTip("Select an available camera") self.camera_combo.setToolTip("Select an available camera")
# activated fires on user pick even when the index is unchanged (file → live override).
self.camera_combo.activated.connect(self._on_camera_combo_changed)
self.camera_combo.currentIndexChanged.connect(self._on_camera_combo_changed) self.camera_combo.currentIndexChanged.connect(self._on_camera_combo_changed)
video_row.addWidget(self.camera_combo, 1) video_row.addWidget(self.camera_combo, 1)
self.btn_refresh_cameras = QPushButton("Refresh") self.btn_refresh_cameras = QPushButton("Refresh")