Skip to content

Conversation

warunawickramasingha
Copy link
Contributor

Description of work

This PR fixes an issue on data ranges shown in SliceViewer's non orthogonal view.

Fixes #34758.

Further detail of work

To test:

  1. Build dev-docs-html and open developer Testing Instructions for SliceViewer Testing and follow the test instructions for Test the Nonorthogonal view
  2. Notice the ranges of each axis to be preserved when doing a transpose of axes in Non Orthogonal view/Orthogonal view

Reviewer

Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.

Code Review

  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards?
  • Are the unit tests small and test the class in isolation?
  • If there is GUI work does it follow the GUI standards?
  • If there are changes in the release notes then do they describe the changes appropriately?
  • Do the release notes conform to the release notes guide?

Functional Tests

  • Do changes function as described? Add comments below that describe the tests performed?
  • Do the changes handle unexpected situations, e.g. bad input?
  • Has the relevant (user and developer) documentation been added/updated?

Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.

Gatekeeper

If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.

@warunawickramasingha warunawickramasingha added Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) Maintenance Unassigned issues to be addressed in the next maintenance period. labels Oct 9, 2024
@warunawickramasingha warunawickramasingha added this to the Release 6.12 milestone Oct 9, 2024
Copy link
Contributor

@RichardWaiteSTFC RichardWaiteSTFC left a comment

Choose a reason for hiding this comment

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

This fixes the bug but introduces another one! You've found the right method to call (show_all_data_clicked) but by calling it on the slicepoint changed slot, the axes are reset even after you've zoomed in and changed the slicepoint, not just on transpose. Previously when you have zoomed in on the plot and then changed the slice point (using the slider along the integrated dimension at the top) the axes limits remain unchanged.

It seemed to work if I added your lines

        if self.view.data_view.nonorthogonal_mode:
            self.show_all_data_clicked()

here in the dimensions_changed slot

self._call_cutviewer_presenter_if_created("on_dimension_changed")

can you give it a go and see if it works for you (and doesn't break anything else!)?

Copy link
Contributor

@RichardWaiteSTFC RichardWaiteSTFC left a comment

Choose a reason for hiding this comment

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

Looks good, tested instructions and bug fixed! Thanks for updating the tests as well.

@SilkeSchomann SilkeSchomann self-assigned this Oct 21, 2024
@SilkeSchomann SilkeSchomann merged commit b7e0aaf into main Oct 21, 2024
10 checks passed
@SilkeSchomann SilkeSchomann deleted the 34758_sliceviewer_transpose branch October 21, 2024 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) Maintenance Unassigned issues to be addressed in the next maintenance period.
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

Transpose in slice viewer non-orthogonal view not displaying data correctly
3 participants