Skip to content
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

Fixed plotter remembering correct tab when switching plot types #9635

Merged

Conversation

andreas-el
Copy link
Contributor

@andreas-el andreas-el commented Jan 2, 2025

Issue
Resolves #9451

Approach
This pull request addresses an issue where the plotter was not storing the correct tab when switching between plot types. The approach involves modifying the relevant code to ensure that the correct tab is stored and displayed when the plot type is changed.

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'pytest tests/ert/unit_tests -n logical -m "not integration_test"')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.72%. Comparing base (855c517) to head (99623db).
Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9635      +/-   ##
==========================================
- Coverage   91.73%   91.72%   -0.01%     
==========================================
  Files         430      430              
  Lines       26639    26649      +10     
==========================================
+ Hits        24437    24444       +7     
- Misses       2202     2205       +3     
Flag Coverage Δ
cli-tests 39.67% <0.00%> (+0.20%) ⬆️
everest-models-test 34.17% <0.00%> (-0.03%) ⬇️
gui-tests 71.84% <100.00%> (+0.01%) ⬆️
integration-test 38.28% <0.00%> (-0.02%) ⬇️
performance-tests 51.68% <26.31%> (-0.01%) ⬇️
test 39.60% <0.00%> (-0.02%) ⬇️
unit-tests 73.98% <26.31%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

codspeed-hq bot commented Jan 2, 2025

CodSpeed Performance Report

Merging #9635 will not alter performance

Comparing andreas-el:fix_plotter_not_selecting_correct_plot_type (99623db) with main (839610b)

Summary

✅ 24 untouched benchmarks

@andreas-el andreas-el force-pushed the fix_plotter_not_selecting_correct_plot_type branch from 80acf00 to f064b34 Compare January 3, 2025 10:55
@andreas-el andreas-el added the release-notes:bug-fix Automatically categorise as bug fix in release notes label Jan 3, 2025
@andreas-el andreas-el changed the title Fixed plotter storing correct tab when switching plot types Fixed plotter remembering correct tab when switching plot types Jan 3, 2025
@@ -166,6 +178,7 @@ def __init__(self, config_file: str, parent: QWidget | None):

@Slot(int)
def currentTabChanged(self, index: Any) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Should index be typed to int here or will that break stuff? If it breaks stuff, should we add an assert on the type of index before using it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I definitely should be int, as the slot is connected to the signal;

void QTabWidget::currentChanged(int index)

Nice catch!

@andreas-el andreas-el force-pushed the fix_plotter_not_selecting_correct_plot_type branch from f064b34 to 99623db Compare January 6, 2025 10:53
@berland
Copy link
Contributor

berland commented Jan 6, 2025

Reproduced the bug, and failed to reproduce it after this PR, so looks perfect. Bonus issue discovery in #9657.

@berland berland merged commit 68263ff into equinor:main Jan 6, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:bug-fix Automatically categorise as bug fix in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plotter not switching to correct plot type when Std Dev is available
3 participants