三维设置加箭头阈值,静默处理网格冲突

对话框写回 flow_on_px(二维三维共用),去掉 analysis_grid_mismatch 告警,缩短 UV/形变等工程腔文案并认 source=analysis。已用 pane UI 与 controller 单测验证。
This commit is contained in:
ykcheungab
2026-10-08 16:01:15 +08:00
parent f2bbab76a6
commit f2d7b3e83c
7 changed files with 130 additions and 43 deletions
+31
View File
@@ -56,6 +56,7 @@ def test_the_pane_holds_a_legend_and_no_settings(panel):
panel.housing_check,
panel.deform_check,
panel.gain_spin,
panel.flow_threshold_spin,
panel.scale_combo,
panel.depth_adaptive_check,
panel.fps_combo,
@@ -106,6 +107,36 @@ def test_adaptive_depth_scale_round_trips_through_the_dialog(panel):
assert panel.settings().depth_scale_adaptive is False
def test_arrow_threshold_round_trips_and_feeds_the_shared_policy(panel):
"""The threshold the dialog writes is the one both views sample with."""
from orisys_app_shared.scene3d.contracts import DisplaySettings
from orisys_app_shared.scene3d.visual_policy import policy_for_settings
panel.apply_settings(
DisplaySettings(flow_on_px=0.9, flow_grid_spacing=12, max_arrows=200)
)
assert panel.flow_threshold_spin.value() == pytest.approx(0.9)
settings = panel.settings()
assert settings.flow_on_px == pytest.approx(0.9)
assert settings.flow_off_px == pytest.approx(0.8)
assert settings.flow_grid_spacing == 12
assert settings.max_arrows == 200
# A colour-scale click must not wipe the held grid or the typed threshold.
panel.housing_check.setChecked(True)
again = panel.settings()
assert again.flow_on_px == pytest.approx(0.9)
assert again.flow_grid_spacing == 12
assert policy_for_settings(again).flow_on_px == pytest.approx(0.9)
def test_source_kind_analysis_uses_its_own_label(panel):
"""A stored result is not labelled as live acquisition."""
panel.set_diagnostics_visible(True)
panel.set_source_kind("analysis")
assert panel.source_label.text() == t("scene3d.source_analysis")
assert panel.source_label.toolTip() == t("scene3d.source_analysis_tip")
def test_the_pane_header_offers_the_two_actions(qt_app):
"""A gear and a view reset: the two things that belong to *looking*."""
from orisys_studio.ui.mesh3d_panel import Mesh3dPanel