This commit is contained in:
awe
2026-06-08 18:40:20 +03:00
parent ed89a66bf2
commit b0135f4a37

View File

@ -1012,6 +1012,7 @@ def run_pyqtgraph(args) -> None:
p_line_phase.setLabel("left", "рад") p_line_phase.setLabel("left", "рад")
try: try:
p_line_phase.setXLink(p_line) p_line_phase.setXLink(p_line)
p_line_phase.enableAutoRange(axis="x", enable=False)
p_line_phase.setVisible(False) p_line_phase.setVisible(False)
except Exception: except Exception:
pass pass
@ -3165,6 +3166,19 @@ def run_pyqtgraph(args) -> None:
elif curve_sec_phase is not None: elif curve_sec_phase is not None:
clear_curve_if_needed("sec_phase", curve_sec_phase) clear_curve_if_needed("sec_phase", curve_sec_phase)
# Force-sync X range from main plot to all secondary plots
if has_sec or runtime.current_secondary_magnitude is not None:
try:
_xr = p_line.viewRange()[0]
if p_secondary_ch is not None:
p_secondary_ch.setXRange(_xr[0], _xr[1], padding=0)
if p_secondary_amp is not None:
p_secondary_amp.setXRange(_xr[0], _xr[1], padding=0)
if p_secondary_phase is not None:
p_secondary_phase.setXRange(_xr[0], _xr[1], padding=0)
except Exception:
pass
if active_do1_tagged: if active_do1_tagged:
if displayed_tagged_aux_low is not None: if displayed_tagged_aux_low is not None:
aux_low_1, aux_low_2 = displayed_tagged_aux_low aux_low_1, aux_low_2 = displayed_tagged_aux_low