-
Notifications
You must be signed in to change notification settings - Fork 127
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
Use ADSObserver for PreviewPlot widget #37078
Use ADSObserver for PreviewPlot widget #37078
Conversation
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.
Thanks for this update to the previous fix. It looks more succinct and neat now, using the ADSobserver
class, and the crash remains fixed.
Looks good to me, just added couple of comments.
*/ | ||
void PreviewPlot::onWorkspaceReplaced(Mantid::API::WorkspaceBeforeReplaceNotification_ptr nf) { | ||
void PreviewPlot::replaceHandle(const std::string &wsName, const Workspace_sptr &ws) { | ||
(void)wsName; |
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.
I guess is up to your personal preference, in some other places of mantid this is written with UNUSED_ARG(..)
macro. Would you prefer this rather than the macro?
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.
Yeah good question. I guess UNUSED_ARG
is more explicit as its clearer what its doing, but then (void)var;
is probably easier to remember as it doesn't require a named macro. Either way I think it would just be down to preference, but I'm not sure I have a preference!
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.
Ok. No problem.
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.
Further improves on stabilizing the use of interfaces across indirect/inelastic categories.
Happy to approve it.
Description of work
This PR ensures the
PreviewPlot
widget uses theAnalysisDataServiceObserver
to keep a track of events happening in the ADS. It is better to use this observer than re-implement the Poco observers. There was a bug, fixed by #37074 , which would not have happened if we had usedAnalysisDataServiceObserver
.To test:
Data Manipulations
Preview
, then clickRun
Data Analysis
interfaceGaus
functionRun
. There should be no crashThis does not require release notes because it is internal maintenance
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
Functional Tests
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.