Skip to content

Conversation

SilkeSchomann
Copy link
Collaborator

Description of work:
This fix includes two changes. The intensity on an interactive cut plot can only be changed when the Interactive Cuts button on the original slice plot is toggled. This had the side-effect that the underlying cut workspace got deleted and was missing when attempting to change the intensity. Now this workspace remains available when the cut plot is still open.
The second fix improves the functions that show a corrected intensity for a plot. The dictionary used to store the cut plots utilises MSliceAxes objects as keys. This sometimes caused KeyErrors, so these functions are now more robust when searching for the value for a key.

To test:

Please replace MSlice in an installed Mantid with the version from this branch and follow steps in the original issue.

Fixes #1071.

@github-project-automation github-project-automation bot moved this to Unassigned in DEVS May 20, 2025
@SilkeSchomann SilkeSchomann moved this from Unassigned to In review in DEVS May 20, 2025
Copy link
Contributor

@GuiMacielPereira GuiMacielPereira left a comment

Choose a reason for hiding this comment

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

I followed the instructions on the original issue and now when Interactive Cuts is toggled the button for the Intensity is grey out, which means the user is not able to change intensity i.e. does not trigger the crash.

I have only a small suggestion to make the code a bit clearer.

Comment on lines 523 to 524
def toggle_interactive_cuts(self, store=True):
self.toggle_icut_button(store)
self.toggle_icut_button(True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe delete the store argument since it's not used by the function anymore? And update the places where this function is being called with the argument?

@github-project-automation github-project-automation bot moved this from In review to Waiting response in DEVS May 20, 2025
@SilkeSchomann SilkeSchomann force-pushed the 1071_fix_gdos_intensity_bug branch from 674429f to 42275e0 Compare May 23, 2025 08:27
Copy link
Contributor

@GuiMacielPereira GuiMacielPereira left a comment

Choose a reason for hiding this comment

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

The changes make the code a bit cleaner. I tested it again manually and everything is working as expected 👍

@github-project-automation github-project-automation bot moved this from Waiting response to Approved in DEVS May 23, 2025
@SilkeSchomann SilkeSchomann merged commit ab623a0 into main May 23, 2025
2 checks passed
@SilkeSchomann SilkeSchomann deleted the 1071_fix_gdos_intensity_bug branch May 23, 2025 10:17
@github-project-automation github-project-automation bot moved this from Approved to Merged in DEVS May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

Exception thrown when changing intensity to GDOS on interactive cut plot
2 participants