Skip to content

Commit

Permalink
Fix basic settings magnetization notifications logic
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Dec 30, 2024
1 parent a327916 commit bfb64f3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/aiidalab_qe/app/configuration/basic/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def render(self):
Set the desired magnetic configuration in <b>advanced</b> settings
</div>
""",
layout=ipw.Layout(visibility="hidden"),
layout=ipw.Layout(display="none"),
)

# Spin-Orbit calculation
Expand Down Expand Up @@ -186,9 +186,10 @@ def _on_input_structure_change(self, _):
self.refresh(specific="structure")

def _on_spin_type_change(self, _):
if self._model.spin_type == "collinear" and self._model.has_tags:
self.warning.layout.display = "flex"
self.magnetization_info.layout.visibility = "hidden"
if self._model.spin_type == "collinear":
self.magnetization_info.layout.display = "block"
if self._model.has_tags:
self.warning.layout.display = "flex"
else:
self.magnetization_info.layout.display = "none"
self.warning.layout.display = "none"
self.magnetization_info.layout.visibility = "visible"

0 comments on commit bfb64f3

Please sign in to comment.