diff --git a/src/chartdataset.cpp b/src/chartdataset.cpp index 21cfc93..6d78be0 100644 --- a/src/chartdataset.cpp +++ b/src/chartdataset.cpp @@ -36,12 +36,12 @@ const Domain ChartDataSet::domain(QChartAxis *axisY) const void ChartDataSet::addSeries(QChartSeries* series, QChartAxis *axisY) { // TODO: we should check the series not already added - series->setParent(this); // take ownership series->setParent(this); // take ownership clearDomains(); if(axisY==0) axisY = m_axisY; + axisY->setParent(this); // take ownership QList seriesList = m_seriesMap.values(axisY);