-
Notifications
You must be signed in to change notification settings - Fork 47
Sets 'Stack Plots' for slicers as a global user preference #3837
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds a global user preference for the "Stack Plots" functionality when using slicers in 2D plots. Previously, this was hardcoded as True in the Plotter2D class; now it can be configured by users through the Preferences panel.
Key Changes:
- Added
STACK_PLOTSconfiguration parameter with a default value ofTrue - Integrated the preference into the Plotting Preferences UI panel
- Updated the preferences documentation to describe the new setting
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/sas/system/config/config.py |
Adds STACK_PLOTS configuration parameter with default value True and descriptive comments |
src/sas/qtgui/Utilities/Preferences/PlottingPreferencesWidget.py |
Adds checkbox widget for stack plots preference, includes signal handling and config restoration |
src/sas/qtgui/Plotting/Plotter2D.py |
Changes stackplots initialization from hardcoded True to use config.STACK_PLOTS |
src/sas/qtgui/MainWindow/media/preferences_help.rst |
Documents the new preference option with description of its behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6013564 to
670aa5d
Compare
krzywon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, the code looks good. Haven't tested functionality.
| **Stack plots when using slicers**: When selected, multiple plots generated using slicers will be added to the same plot | ||
| window, each with its own legend entry. When not selected, each plot will open in its own window. *persistent* | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is documentation on the plot stacking, a link to it from here would be helpful.
JoGaudet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the functionality and it seems to work as intended. We can now see the option to click "Stack plots when using slicers", which automatically allow (or disallowed) the stacking of multiple slicers into the same plot. I tried the global preference and it works as intended for all slicers available.
Description
As suggested by @krzywon in PR #3806, the 'Stack Plots' checkbox has been added as a global user preference. Also adds this to the preferences documentation.
Fixes #3830
How Has This Been Tested?
Manually tested functionality.
Review Checklist:
[if using the editor, use
[x]in place of[ ]to check a box]Documentation (check at least one)
Installers
Licensing (untick if necessary)