-
Notifications
You must be signed in to change notification settings - Fork 122
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
IAddWorkspaceDialog moved to a common location and no longer a qobject #36624
IAddWorkspaceDialog moved to a common location and no longer a qobject #36624
Conversation
👋 Hi, @robertapplin, Conflicts have been detected against the base branch. Please rebase your branch against the base branch. |
cd0c7d2
to
185b908
Compare
👋 Hi, @robertapplin, Conflicts have been detected against the base branch. Please rebase your branch against the base branch. |
8364c6d
to
f2490d9
Compare
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 have followed the test instructions and everything works fine, also some sneaky qt warnings that these FqFitWorkspaceDialogs were producing are not there anymore. this is another great step on improving quality of life for developers of indirect/inelastic. Thank you.
I have minor comments and a question and then it's good to approve.
qt/scientific_interfaces/Inelastic/Common/IAddWorkspaceDialog.h
Outdated
Show resolved
Hide resolved
qt/scientific_interfaces/Inelastic/Analysis/IndirectFitDataPresenter.h
Outdated
Show resolved
Hide resolved
dialog->updateSelectedSpectra(); | ||
dialog->show(); | ||
|
||
m_addWorkspaceDialog = dialog; |
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.
This is just a question: I know lifetime of dialog is handled by qt classes, but seems you can create as many workspacedialogs as you want and the member m_addWorkspaceDialog
would be pointing to the last one created. Can't that be a problem if multiple dialog instances are open at the same time and you try to add data from, say, the first opened workspaceDialog?
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.
Good spot, you are right, this will cause an issue. I haven't fixed this yet in the latest commits - I will fix it when I get back from A/L, so lets keep this PR open until then
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.
This is also a problem on main
and release-next
, so I have opened an issue #36756 that can be used to track the issue for the current release. This PR fixes the problem, so we should maybe consider for this to go into release-next
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 agree.
👋 Hi, @robertapplin, Conflicts have been detected against the base branch. Please rebase your branch against the base branch. |
f2490d9
to
3d05620
Compare
212ae17
to
0154344
Compare
qt/scientific_interfaces/Inelastic/Analysis/ConvFitAddWorkspaceDialog.cpp
Show resolved
Hide resolved
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'm testing it. But the dialogs for I(q,t) and MSD fit tabs of Data Analysis don't work. You see opening them in a blink and closing inmediately again. Can you check if you see the same?
🤦 Yes I get the same, it should be fixed now. Thanks! |
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 solving it quickly. It looks good and it also fixes #36710 .
It's a nice refactoring of workspace dialogs, happy to approve it.
Description of work
This PR moves the
IAddWorkspaceDialog
class to the MantidQtWidgetsCommon library, and also combines the functionality of theAddWorkspaceDialog
class with theIndirectAddWorkspaceDialog
class because they are essentially the same thing. This has meant I could remove theIndirectAddWorkspaceDialog
class and just use the standardAddWorkspaceDialog
class from the MantidQtWidgetsCommon library.This PR also makes sure the
IAddWorkspaceDialog
class is no longer a QObject.Fixes #36565
Fixes #36756
To test:
To test Fit Script Generator, follow the instructions on this page:
https://docs.mantidproject.org/nightly/interfaces/general/Fit%20Script%20Generator.html
To test Inelastic Data Analysis follow these instructions
https://developer.mantidproject.org/Testing/Inelastic/DataAnalysisTests.html
This does not require release notes because this is not a new feature or bug fix
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.