Ticket #7664 (closed: fixed)
Clear Menu with Clear UB options
Reported by: | Owen Arnold | Owned by: | Owen Arnold |
---|---|---|---|
Priority: | major | Milestone: | Release 3.0 |
Component: | Diffraction | Keywords: | |
Cc: | Blocked By: | #7539 | |
Blocking: | Tester: | Russell Taylor |
Description
This is a user requested addition to #7539. We should be able to run the ClearUB algorithm off the right-click menu in Mantid Plot.
Nick suggests introducing a top-level clear submenu, with Clear UB within that. There are other possibilities for clearing, such as with tube calibration.
Change History
comment:2 Changed 7 years ago by Owen Arnold
refs #7664. Implement new menu and options.
Changeset: be43df0995aaae201652f012178bd63c5b2d79ed
comment:3 Changed 7 years ago by Owen Arnold
- Status changed from inprogress to verify
- Resolution set to fixed
comment:4 Changed 7 years ago by Owen Arnold
Tester:
- In MantidPlot Right click a workspace containing a UB matrix.
- There should be a Clear menu with a sub menu option for Clearing the UB Matrix.
- Selecting this should clear the UB matrix.
- Repeat this again on the same workspace (which now has no UB to remove). Should do nothing other than report that there is no UB to clear in the logs.
comment:5 Changed 7 years ago by Russell Taylor
- Status changed from verify to verifying
- Tester set to Russell Taylor
comment:6 Changed 7 years ago by Russell Taylor
- Status changed from verifying to reopened
- Resolution fixed deleted
If I select this menu item off of a TableWorkspace I (of course) get an error when ClearUB runs. This is not a disaster, but I think that the menu item should only be enabled if the workspace has a UB matrix to clear (which implies that it would be disabled for workspaces that are not capable of holding one). Allied to this, the log message saying that there is no UB is at a lower level than the default logging level.
comment:7 Changed 7 years ago by Owen Arnold
- Status changed from reopened to inprogress
Thanks for raising this. This should definitely be fixed as described.
comment:8 Changed 7 years ago by Owen Arnold
refs #7664. Update ClearUB to provide a DryRun mode.
Also add output property indicating the action taken or to be taken.
Changeset: 5fb5775d6f76987a20c90b0b289096c1c2eeebcc
comment:9 Changed 7 years ago by Owen Arnold
refs #7664. Refactor ClearUB to make it generic.
In order to fix a work around issue reported #7809, the HasUB algorithm functionality needs to be in a separate algorithm where the workspace is direction input, and not inout. However, most of the processing for this is common to both algorithms.
Changeset: f48a18a9770e5afe6ea86b09260444c0880fc703
comment:10 Changed 7 years ago by Owen Arnold
refs #7664. New algorithm HasUB.
New algorithm called HasUB formed from the generic parts of ClearUB. Tests added.
Changeset: fbeff8d03a056ec684bb71c643c8d453102104b4
comment:11 Changed 7 years ago by Owen Arnold
refs #7664. Remove HasUB aspects from ClearUB alg.
Changeset: 0066f8cf9bb808ab7e5d881c98401a780e41da1f
comment:12 Changed 7 years ago by Owen Arnold
refs #7664. Changes to the algorithms.
Give better logging. Especially useful if someone wants to run HasUB via MantidPlot.
Changeset: adc211a327cec9dd582a06f25e3342065f01c261
comment:13 Changed 7 years ago by Owen Arnold
refs #7664. Update the UI components for new behaviour.
This hooks the UI into the new algorithms. The menu will now use HasUB to determine if the workspace has any UB matrixes, and update the clear options appropriately, this includes handling of workspace types that are not compatible with ExperimentInfo, such as table workspace. The Clear UB option is disabled until HasUB reports otherwise. The Clear UB option should execute the ClearUB algorithm.
Changeset: f14b52f515f143af80f584af97e6887fc89f80b3
comment:14 Changed 7 years ago by Owen Arnold
refs #7664. Supress logging.
Changeset: 898d1740c1d28269100d7dd580b0213f93cc77db
comment:15 Changed 7 years ago by Owen Arnold
refs #7664. Fix warnings
Changeset: b2933e66d2b10d4da7dd2297af9b0f7a9fbfd16b
comment:16 Changed 7 years ago by Owen Arnold
- Status changed from inprogress to verify
- Resolution set to fixed
New test instructions
Tester:
- In MantidPlot Right click a workspace containing a UB matrix.
- There should be a Clear menu with a sub menu option for Clearing the UB Matrix.
- The option should be enabled
- Selecting this should clear the UB matrix.
Now try the same menu option on the Matrix workspace just cleared. The option should be disabled.
Now try the Clear UB option on a TableWorkspace, should find that the menu option is disabled
comment:18 Changed 7 years ago by Russell Taylor
- Status changed from verifying to closed
Looks good. I notice that HasUB is only triggered upon the opening of the context menu, which is good (maybe it could even be delayed until the 'Clear Options' submenu is opened, but this is probably good enough).
comment:20 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 8509