From 9d4236dd320d8e71ab201da5fcc1d71a2fcffd50 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 26 Mar 2009 20:44:18 -0400 Subject: Clean up more than just the widget --- sigmodr/SigmodrUI.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sigmodr/SigmodrUI.cpp b/sigmodr/SigmodrUI.cpp index c3049896..7d048b79 100644 --- a/sigmodr/SigmodrUI.cpp +++ b/sigmodr/SigmodrUI.cpp @@ -373,7 +373,11 @@ bool SigmodrUI::closeWidget() } } if (closed) + { delete formPanel->takeWidget(); + formPanel->setWidget(NULL); + boxButtons->setEnabled(false); + } return closed; } @@ -472,7 +476,6 @@ void Sigmodr::SigmodrUI::on_treeSigmod_clicked(const QModelIndex& index) ObjectUI* widget = treeSigmod->editorWidget(index); if (widget && closeWidget()) { - boxButtons->setEnabled(false); connect(widget, SIGNAL(changed(bool)), boxButtons, SLOT(setEnabled(bool))); connect(widget, SIGNAL(saved()), this, SLOT(setDirty())); connect(buttonApply, SIGNAL(clicked()), widget, SLOT(apply())); -- cgit