Skip to content

Commit dfb2cf3

Browse files
andyclaude
andcommitted
Builder: stop re-showing every property panel as a job delivers results (#111)
Opening a finished calculation shows three panels; leaving one open while its job finishes showed all of them, the viewer buried in overlays. The difference was the tell, and it is exactly what was reported twice. addPropertyPanel() has two paths. For a panel that does not exist yet it creates one and applies defaultShownPanels -- Calculation Summary, Energies, MOs -- hiding the rest. For one that already exists it called pinfo.Show(), unconditionally. updatePropertyMenus() runs again every time the calculation gains a property, and a running job gains them one at a time. So the first pass created the panels and hid most of them, and every pass after that took the other branch and re-showed all of them. Reopening the calculation later went back through the creation path, which is why it then looked correct. The forced show has no caller that needs it. This function's job is to make sure the panel exists and has a Property-menu entry; the user showing or hiding one goes through OnPropertyMenuClick(), which sets the pane's visibility itself, and the layout-cache caller restores saved visibility with LoadPaneInfo() immediately afterwards. Leaving the pane alone is also what lets a panel the user closed stay closed while a job is still running, which it previously could not. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFMUNbw2UpRPmgsqviAowb
1 parent 1e0ef99 commit dfb2cf3

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

‎src/apps/builder/Builder.C‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4624,7 +4624,23 @@ void Builder::addPropertyPanel(PropertyPanel *panel, const string& name)
46244624
// Don't add this panel if it is already being managed
46254625
wxAuiPaneInfo &pinfo = p_mgr.GetPane(panel);
46264626
if (pinfo.IsOk()) {
4627-
pinfo.Show();
4627+
// Deliberately does NOT Show() it. This used to, which undid the
4628+
// defaultShownPanels choice below every time the function ran
4629+
// again -- and it runs again on every property the calculation
4630+
// gains. Leave a calculation open while its job finishes and each
4631+
// arriving property re-showed every panel already created, so the
4632+
// viewer ended up covered in overlays; reopening the same
4633+
// calculation afterwards showed only the default three, because
4634+
// then the panels were being created rather than re-visited. That
4635+
// is exactly the reported difference (#111).
4636+
//
4637+
// Nothing needs a forced show here. This function's job is to make
4638+
// sure the panel exists and has a Property-menu entry; the user
4639+
// showing or hiding one goes through OnPropertyMenuClick(), which
4640+
// sets the pane's visibility itself, and the layout-cache path at
4641+
// the other caller restores saved visibility with LoadPaneInfo()
4642+
// immediately afterwards. Leaving it alone is what lets a panel
4643+
// the user closed stay closed.
46284644
} else {
46294645
wxAuiPaneInfo info = wxAuiPaneInfo();
46304646
info.DefaultPane();

0 commit comments

Comments
 (0)