-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix the structure appearance in the final geometry tab. #92
Conversation
aiidalab_qe/node_view.py
Outdated
self.struct_view._viewer.handle_resize() | ||
self.struct_view._viewer.camera = "perspective" | ||
self.struct_view._viewer.camera = "orthographic" |
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.
- Do you need all three of these changes to trigger the rendering or would either the first or the last two suffice?
- What happens if the camera was previously set to "perspective"?
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.
Do you need all three of these changes to trigger the rendering or would either the first or the last two suffice?
I couldn't entirely figure out the origin of the problem. The solution suggested here didn't work as-is. By pure luck, I discovered that changing the camera mode would let the structure appear. Therefore, I always switch camera to the non-default "perspective" mode and back to the default "orthographic".
What happens if the camera was previously set to "perspective"?
It is changed back to "orthographic".
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've tested this, all commands are necessary for the fix to work. I'm going to submit a minor patch that will keep the user set camera when switching between tabs, otherwise this is good.
Co-authored-by: Carl Simon Adorf <simon.adorf@epfl.ch>
fixes #69