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.
This commit is contained in:
Mark Liversedge
2011-06-04 21:51:56 +01:00
parent 641916e1a7
commit 396e47ff8b

View File

@@ -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);