Skip to content

SF_CollectPreviousPlotProperties: Fix it#2674

Merged
t-b merged 1 commit intomainfrom
bugfix/2674-sf-info-restore
Mar 22, 2026
Merged

SF_CollectPreviousPlotProperties: Fix it#2674
t-b merged 1 commit intomainfrom
bugfix/2674-sf-info-restore

Conversation

@t-b
Copy link
Collaborator

@t-b t-b commented Mar 20, 2026

This is broken since 0964909 (Merge pull request #2592 from AllenInstitute/feature/2592-refactor_sf_plotter2, 2025-12-17) where we refactored the plotting internals.

For the default mode of SF_DM_SUBWINDOWS we need to iterate over all existing subwindows and store the plot properties before we kill them later via SF_ClearPlotPanel.

The check for table or not is now also included in SF_CollectPreviousPlotProperties.

In order to not regress again also a test is now added for both display modes.

Close #2661

Will merge once CI has passed.

This is broken since 0964909 (Merge pull request #2592 from
AllenInstitute/feature/2592-refactor_sf_plotter2, 2025-12-17) where we
refactored the plotting internals.

For the default mode of SF_DM_SUBWINDOWS we need to iterate over all
existing subwindows and store the plot properties before we kill them
later via SF_ClearPlotPanel.

The check for table or not is now also included in
SF_CollectPreviousPlotProperties.

In order to not regress again also a test is now added for both display
modes.
Copilot AI review requested due to automatic review settings March 20, 2026 20:23
@t-b t-b self-assigned this Mar 20, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes SweepFormula plot-property restoration (cursors/annotations/axes) that broke after the SF plotter refactor by properly collecting prior graph state in subwindow display mode, and adds regression tests to cover both window display modes.

Changes:

  • Update SF_CollectPreviousPlotProperties to gather properties across existing graph subwindows (and centralize the “table vs graph” handling).
  • Adjust SF_CreateDataDisplayWindow to always call the collection function (it internally ignores non-graph windows).
  • Add a data generator and a new parameterized test to validate restoration in both SF_DM_NORMAL and SF_DM_SUBWINDOWS.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
Packages/tests/UTF_DataGenerators.ipf Adds a test-data generator returning the SweepFormula display modes.
Packages/tests/Basic/UTF_SweepFormula.ipf Adds a regression test that verifies restoration of cursors, legend annotation position, and axis range for both display modes.
Packages/MIES/MIES_SweepFormula.ipf Fixes plot-property collection by iterating existing windows/subwindows before later clearing them.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@t-b t-b merged commit f9f66ce into main Mar 22, 2026
26 checks passed
@t-b t-b deleted the bugfix/2674-sf-info-restore branch March 22, 2026 13:49
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.

SF: Annotation, etc. restoration is broken

2 participants