mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user