-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Describe the bug
MSlice workspaces are just a thin wrapper around a Mantid workspace. In order to allow workspace history to work these have to be kept in the analysis data service (ADS) registry. However, this means that a user in Mantid can delete the backing workspace without recourse to MSlice so that the MSlice workspace no longer has access to its data. This most commonly happens when they do mtd.clear()
.
Previously we could only issue a warning to users not to do this but since the new ADSObserver
was added to MSlice we can now handle this issue - currently deleting a workspace in MSlice will delete the underlying (hidden) workspace in Mantid, and an mtd.clear()
will result in the corresponding MSlice workspaces being deleted too.
However, manually deleting the hidden Mantid workspace still leaves the MSlice workspace intact and will cause an error if the user tries to access the MSlice workspace (or plot it etc).
This is an edge case though and it might not be worth fixing (it requires users to enable Show Invisible Workspaces
and then to delete the __MSL
prefixed workspace(s).
To Reproduce
Steps to reproduce the behavior:
- In Mantid File->Settings->General check
Show Invisible Workspaces
- Open a file in MSlice. See that a hidden Mantid workspace
__MSL<filename>
is created. - In the Mantid window, delete the hidden
__MSL<filename>
workspace - In MSlice click on the loaded workspace
- Sad Mantid appears
Expected behavior
When the hidden Mantid workspace is deleted the MSlice workspace is also deleted.
Screenshots
N/A
MSlice Version (please complete the following information):
- MSlice Version
2.10.1.dev29
- Mantid nightly
6.11.20250131.1730
Additional context
Add any other context about the problem here.