-
Notifications
You must be signed in to change notification settings - Fork 6
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
Spectrum viewer refactoring - Moving logic from the view to the presenter #2227
Merged
Conversation
This file contains 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
…d roi changes when switching ROI->RITS tabs
MikeSullivan7
force-pushed
the
2224_spectrum_viewer_refactoring
branch
from
June 13, 2024 15:08
537961b
to
a0b1e70
Compare
samtygier-stfc
requested changes
Jun 13, 2024
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.
Not a full review, just a quick thing that i noticed
samtygier-stfc
approved these changes
Jun 17, 2024
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.
All looks good. Passes tests.
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.
Issue
Closes #2224
Description
The following functions have been moved from the view to the presenter:
do_adjust_roi
handle_storing_current_roi_name_on_tab_change
on_visibility_change
some new functions have been made to help with testing:
presenter.check_action
view.get_roi_properties_spinboxes
view.setup_roi_properties_spinboxes
The logic for
presenter.handle_storing_current_roi_name_on_tab_change
has also been simplified.Unit tests for the following functions have been added:
presenter.change_selected_menu_option
presenter.do_adjust_roi
presenter.handle_storing_current_roi_name_on_tab_change
presenter.refresh_spectrum_plot
presenter.redraw_all_rois
presenter.handle_roi_clicked
handle_enable_normalised
Testing
make check
Acceptance Criteria
Open MI and load some data into it (with spectrum file if possible) and make sure that the functionality is the same as it was before this refactor and no bugs have been introduced.
run
make check
ormake test
and check that all tests passDocumentation
Will add release note