Present replay 3D with the cursor and open Analyze on a remembered video

Replay left the 3D pane on the rest mesh or a sparse overlay, and Analyze skipped the setup dialog unless the file was re-picked. Live Run no longer starts a chain on a video path. Verified with Studio tests for flush, overlay mask, Analyze open, live-video refusal, and locales.
This commit is contained in:
ykcheungab
2026-10-05 16:52:27 +08:00
parent 3433eb0fec
commit c0a10e6adb
26 changed files with 2226 additions and 158 deletions
+24 -2
View File
@@ -12,6 +12,7 @@ broken application (the same rule ``apps/autocal`` follows).
from __future__ import annotations
import itertools
import logging
import os
import shutil
import sys
@@ -91,8 +92,29 @@ def make_window(qt_app, tmp_path, monkeypatch):
for window in created:
try:
window.close()
except Exception:
pass
except Exception: # noqa: BLE001 - teardown must not fail a test that passed
# Reported rather than swallowed: a window that cannot close is a Qt lifetime
# problem worth seeing, but it must not turn a green test red.
logging.getLogger(__name__).debug("could not close a test window", exc_info=True)
@pytest.fixture
def decline_video_prompt(monkeypatch):
"""Answer the bare-video setup prompt with "no", so it cannot block a test.
Opening a video that is not a recording now asks *how* to analyse it, and the dialog is
modal: a test that drives ``load_video`` on a bare video without answering waits for a
person who is not there. Declining is the answer that leaves the old behaviour intact —
the video plays, nothing is analysed — which is what the tests predating the prompt are
about.
"""
from PySide6.QtWidgets import QDialog
from orisys_studio.ui.video_analysis_dialog import VideoAnalysisDialog
monkeypatch.setattr(
VideoAnalysisDialog, "exec", lambda self: QDialog.DialogCode.Rejected
)
def visible_descendants(widget):