三维未激活采样显示灰点,二维增加深度叠箭头。
分析对话框默认使用传感器对话框保存的标定,关闭按钮改为保存。框选曲线时数值卡片仍显示光标读数。相关单测通过。
This commit is contained in:
@@ -2775,9 +2775,8 @@ def main() -> int:
|
||||
plots.overview_curve.getData()[0].size > 0,
|
||||
"the whole-session overview strip is empty",
|
||||
)
|
||||
# A window narrower than the session is a selection: its peak becomes the big
|
||||
# number on each card and its mean/σ the line under it, while the strip keeps
|
||||
# only the size of the selection (the long per-channel line did not fit).
|
||||
# A window narrower than the session is a selection in the strip only: the
|
||||
# cards stay on the sample under the cursor.
|
||||
check(plots._selection is not None, "zooming in did not record a selection")
|
||||
summary = plots.stats_label.text()
|
||||
check(summary != "", "the strip does not state the size of the selection")
|
||||
@@ -2789,34 +2788,25 @@ def main() -> int:
|
||||
"选区" in summary or "Selection" in summary,
|
||||
f"the strip does not say that the numbers describe a selection: {summary!r}",
|
||||
)
|
||||
expected_peak = float(plots._selection.peaks[0])
|
||||
peak_text = (
|
||||
f"{expected_peak:.3f}" if plots.unit() == "N" else f"{expected_peak:.1f}"
|
||||
from orisys_studio.ui.force_plots import format_force
|
||||
|
||||
expected_cursor = format_force(
|
||||
plots._display_values[0], plots.unit(), presentation=plots.presentation
|
||||
)
|
||||
check(
|
||||
plots.value_labels[0].text() == peak_text,
|
||||
f"the FN card is not the selection's peak: {plots.value_labels[0].text()!r}",
|
||||
plots.value_labels[0].text() == expected_cursor,
|
||||
f"the FN card is not the cursor sample: {plots.value_labels[0].text()!r}",
|
||||
)
|
||||
check(
|
||||
plots.value_details[0].text() != ""
|
||||
and ("均" in plots.value_details[0].text() or "mean" in plots.value_details[0].text()),
|
||||
f"the card does not state the selection's mean: "
|
||||
f"{plots.value_details[0].text()!r}",
|
||||
plots.value_details[0].text() == "",
|
||||
f"the card still carries a mean line: {plots.value_details[0].text()!r}",
|
||||
)
|
||||
for card, label, detail in zip(
|
||||
plots.value_cards, plots.value_labels, plots.value_details
|
||||
):
|
||||
check(
|
||||
detail.width() >= detail.sizeHint().width(),
|
||||
f"the selection detail line is clipped: "
|
||||
f"{detail.width()} < {detail.sizeHint().width()}",
|
||||
)
|
||||
# Leaving the selection hands the cards back to the cursor readout.
|
||||
# Leaving the selection clears the strip; the cards stay a cursor readout.
|
||||
plots.follow_latest()
|
||||
check(plots._selection is None, "the selection survived 'back to latest'")
|
||||
check(
|
||||
plots.value_details[0].text() == "",
|
||||
f"the mean line survived leaving the selection: "
|
||||
f"a detail line appeared after leaving the selection: "
|
||||
f"{plots.value_details[0].text()!r}",
|
||||
)
|
||||
|
||||
@@ -3673,7 +3663,12 @@ def main() -> int:
|
||||
f"{replay_window.toolbar.source_summary.text()!r}",
|
||||
)
|
||||
check(
|
||||
replay_window.arrow_panel.view_modes() == ("arrows_pure", "arrows_stitched", "depth"),
|
||||
replay_window.arrow_panel.view_modes() == (
|
||||
"arrows_pure",
|
||||
"arrows_stitched",
|
||||
"depth",
|
||||
"depth_arrows",
|
||||
),
|
||||
"the 2D panel did not return to its live views",
|
||||
)
|
||||
check(
|
||||
|
||||
Reference in New Issue
Block a user