Merged
Conversation
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.
There was a problem hiding this comment.
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_CollectPreviousPlotPropertiesto gather properties across existing graph subwindows (and centralize the “table vs graph” handling). - Adjust
SF_CreateDataDisplayWindowto 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_NORMALandSF_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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.