-
Notifications
You must be signed in to change notification settings - Fork 0
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
add display Q-beam angle in view and presenter #45
base: next
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #45 +/- ##
==========================================
+ Coverage 98.53% 98.56% +0.02%
==========================================
Files 10 10
Lines 819 835 +16
==========================================
+ Hits 807 823 +16
Misses 12 12 ☔ View full report in Codecov by Sentry. |
crosshair_widget.modQ_edit.setFocus() | ||
qtbot.keyPress(crosshair_widget.modQ_edit, Qt.Key_Return) | ||
|
||
assert crosshair_widget.QZ_angle_edit.text() == "nan" |
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 don't think it is very user friendly to have a Nan value displayed on the view. Also the field is defined to have numerical values as valid ones and is not valid.
Can we add a red border and/or replace the NaN to either empty or similar?
self.powder_mode_switch_callback = None | ||
self.sc_mode_switch_callback = None | ||
|
||
# callback functions defined by the presenter | ||
self.fields_callback = None | ||
self.powder_mode_switch_callback = None | ||
self.sc_mode_switch_callback = None |
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.
lines 42-35 are duplicated with lines 46-48.
It seems like some rebase/merge conflicts were not resolved properly.
I would suggest checking other files for duplicated code, too.
@@ -143,3 +151,4 @@ def handle_switch_to_sc(self): | |||
# if the view contains an invalid value it is overwritten | |||
saved_values = self.model.get_single_crystal_data() | |||
self.view.sc_widget.set_values(saved_values) | |||
self.handle_QZ_angle() |
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.
Is the label updated at different times than the rest crosshair values?
from what I see they are updated at the same time in the presenter.
They don't need to be a separate flow, they can be part of the same flow (functions), e.g crosshair_widget.set_values
documentation classes, module and workflow graphs would need to be updated with this new addition, too. |
Short description of the changes:
Implement the gui component and MVP connection of the Q-beam angle in view and presenter.
Implement unit tests.
EWM 9409
Long description of the changes:
Check list for the pull request
Check list for the reviewer
Manual test for the reviewer
References