fix(studio): 统一 Box/Mini 箭头网格与强度着色
This commit is contained in:
@@ -1734,16 +1734,15 @@ class StudioMainWindow(QMainWindow):
|
||||
return wanted
|
||||
|
||||
def _arrow_policy(self):
|
||||
"""The one flow-arrow policy the 2D canvas and the 3D surface both sample with.
|
||||
"""Use the box recording grid or the finger's shared 2D/3D display policy.
|
||||
|
||||
The thresholds and the sample grid are display settings (the pane's), so the
|
||||
policy is built from them here and handed to the 2D renderer; the 3D composer
|
||||
builds the same value from the same settings object
|
||||
(``scene3d.composer`` via ``visual_policy.policy_for_settings``). That is what
|
||||
makes the two figures trigger at the same strength: previously each path built
|
||||
its own policy *and* the 3D one applied a hysteresis the canvas did not, so the
|
||||
same frame could carry arrows in one figure and none in the other.
|
||||
Box and mini analysis store samples on the SDK box grid; live rendering must
|
||||
use that same grid. Finger keeps one policy for its 2D and 3D views.
|
||||
"""
|
||||
if self._draw_style() != "finger":
|
||||
from orisys_app_shared.acquisition.arrows import sdk_box_policy
|
||||
|
||||
return sdk_box_policy()
|
||||
from orisys_app_shared.scene3d.visual_policy import policy_for_settings
|
||||
|
||||
return policy_for_settings(self.mesh3d_panel.display_settings())
|
||||
|
||||
@@ -2424,6 +2424,15 @@ def test_the_two_figures_are_drawn_from_one_arrow_policy(make_window, monkeypatc
|
||||
window.close()
|
||||
|
||||
|
||||
@pytest.mark.parametrize("sensor_type", ["box", "mini"])
|
||||
def test_box_family_live_uses_the_recorded_sample_grid(make_window, sensor_type):
|
||||
from orisys_app_shared.acquisition.arrows import sdk_box_policy
|
||||
|
||||
window = _show(make_window(sensor_type=sensor_type), (1440, 880))
|
||||
assert window._arrow_policy() == sdk_box_policy()
|
||||
window.close()
|
||||
|
||||
|
||||
def test_a_bare_video_plays_even_though_it_is_not_a_recording(
|
||||
make_window, record_root, decline_video_prompt
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user