Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions quantui/app_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -3196,8 +3196,11 @@ def _plot_export_row(prefix: str) -> widgets.HBox:
# a result can be drawn (VW.7); density, spin, ESP and the gallery
# could only fail, so they are removed and the panel says so (viewer
# audit VA.2). The orbital controls stay: show_orbital_diagram only
# reveals them when the result has saved cubes.
app._iso_surface_dd.options = [("Molecular orbital", "orbital")]
# reveals them when the result has saved cubes. The surface kind is
# pinned by hiding its dropdown (value stays "orbital"); its options
# are left intact so the dispatch code and its tests see one widget
# shape with or without PySCF.
app._iso_surface_dd.value = "orbital"
app._iso_surface_dd.layout.display = "none"
iso_body.children = (
widgets.HTML(
Expand Down
4 changes: 3 additions & 1 deletion tests/test_viewer_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ def _walk(w):
assert any("no PySCF" in str(getattr(w, "value", "")) for w in widgets)
assert app._iso_generate_btn in widgets # VW.7 path stays reachable
assert app._orb_gallery_btn not in widgets
assert [v for _, v in app._iso_surface_dd.options] == ["orbital"]
# Only orbitals can be drawn: the surface-kind dropdown is hidden at "orbital".
assert app._iso_surface_dd.layout.display == "none"
assert app._iso_surface_dd.value == "orbital"


def test_orbital_controls_shown_without_pyscf_only_with_saved_cubes(
Expand Down
Loading