From 396e47ff8b1a9589434680d5d43fb1e6986313a1 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Sat, 4 Jun 2011 21:51:56 +0100 Subject: [PATCH] Possible fix for Add Chart crash I have not been able to reproduce the crash, but reading through the code related to the chart add dialog I have spotted an error where the chart could be destroyed when you click the OK button, but still referenced. This modification also appears to fix an issue with chart controls not working when you first add a new chart. Requires testing before the associated defect in GoldenTracker can be closed. --- src/HomeWindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/HomeWindow.cpp b/src/HomeWindow.cpp index 4b0fa108e..ace22d1a8 100644 --- a/src/HomeWindow.cpp +++ b/src/HomeWindow.cpp @@ -1027,6 +1027,7 @@ void GcWindowDialog::okClicked() // note that in reject they are not and will // get deleted (this has been verfied with // some debug statements in ~GcWindow). + chartLayout->removeWidget(win); // remove from layout! win->setParent(mainWindow); if (win->controls()) win->controls()->setParent(mainWindow);