三维设置加箭头阈值,静默处理网格冲突
对话框写回 flow_on_px(二维三维共用),去掉 analysis_grid_mismatch 告警,缩短 UV/形变等工程腔文案并认 source=analysis。已用 pane UI 与 controller 单测验证。
This commit is contained in:
@@ -978,10 +978,45 @@ def test_the_controller_redraws_on_a_display_change_and_runs_no_pass(pass_root):
|
||||
assert session.threshold() == pytest.approx(0.5)
|
||||
# The frame is rebuilt from the same stored record, not from a new one.
|
||||
assert session.frame(int(session.frame_ids[0])).frame_id == FIRST_FRAME_ID
|
||||
assert host.notes == [], "a threshold change must not lecture about the grid"
|
||||
finally:
|
||||
session.reader.close()
|
||||
|
||||
|
||||
def test_a_refused_grid_change_redraws_without_a_status_warning():
|
||||
"""Moving max_arrows cannot be served; the frame is redrawn and nothing is said.
|
||||
|
||||
No evidence recording: the session is a stub whose ``serve_policy`` refuses, which
|
||||
is exactly the path that used to push ``playback.analysis_grid_mismatch``.
|
||||
"""
|
||||
class _Reader:
|
||||
def close(self) -> None:
|
||||
pass
|
||||
|
||||
class _Session:
|
||||
def __init__(self) -> None:
|
||||
self.calls: list = []
|
||||
self.reader = _Reader()
|
||||
|
||||
def serve_policy(self, policy) -> bool:
|
||||
self.calls.append(policy)
|
||||
return False
|
||||
|
||||
def close(self) -> None:
|
||||
pass
|
||||
|
||||
controller, host, engine, parts = _controller()
|
||||
session = _Session()
|
||||
controller.results.open_session(session) # type: ignore[arg-type]
|
||||
engine.use_analysis(session)
|
||||
engine.redraws = 0
|
||||
controller.on_display_settings(DisplaySettings(max_arrows=50))
|
||||
assert engine.redraws == 1, "the refused policy still redraws the stored frame"
|
||||
assert len(session.calls) == 1
|
||||
assert host.notes == [], "a grid mismatch must not reach the status bar"
|
||||
controller.results.close()
|
||||
|
||||
|
||||
# ------------------------------------------------------------ analysis on open
|
||||
def test_a_running_session_does_not_hide_a_stored_result(pass_root):
|
||||
"""A result on disk is served while a session is open: reading it opens no chain.
|
||||
|
||||
Reference in New Issue
Block a user