Skip to content

Keep header axes synced under ctrl+P propagation - #50

Merged
oliche merged 2 commits into
mainfrom
fix/link-header-axes-propagate
Jul 21, 2026
Merged

Keep header axes synced under ctrl+P propagation#50
oliche merged 2 commits into
mainfrom
fix/link-header-axes-propagate

Conversation

@oliche

@oliche oliche commented Jul 21, 2026

Copy link
Copy Markdown
Member

Problem

The top and side header axes are linked to the main seismic view, and ctrl+P propagates the link across windows. But a pyqtgraph ViewBox holds only one linked view per axis, so calling setXLink twice on the same viewbox overwrites the first link.

The intra-window wiring put the link on the seismic viewbox (seismic.setXLink(header_h)). When propagate() then ran eqc.seismic.setXLink(master.seismic), it clobbered that slot and detached the propagated windows' header axes.

Fix

Reverse the intra-window link direction: link the header viewboxes to the seismic (header_h.setXLink(seismic), header_v.setYLink(seismic)). This frees the seismic's X/Y link slots for cross-window propagation. Because linking is bidirectional and chains transitively, everything now stays in sync: header -> seismic -> master-seismic.

Also harden EasyQC._instances() (inherited by EphysViewer) to skip wrappers whose underlying C++ object has been deleted — these still pass isinstance but raise RuntimeError on any method call, which could surface during window lookup or ctrl+P propagation when a stale window lingered.

Tests

  • test_header_axes_track_seismic: header viewboxes link to the seismic, the seismic's slots stay free, and panning propagates to the header strip.
  • test_propagate_link_keeps_headers_attached: after the cross-window link, the other window's seismic follows the master and its header still follows its own seismic.
  • test_instances_skips_deleted_wrappers: _instances() filters out deleted wrappers instead of raising.

Full suite (53 tests) passes; ruff clean.

@oliche
oliche merged commit 6b66617 into main Jul 21, 2026
11 checks passed
@oliche
oliche deleted the fix/link-header-axes-propagate branch July 21, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant