From 39ec6fd44b3162677be68c5aa7e4ff0fe14ff920 2012-06-28 07:23:35 From: sauimone Date: 2012-06-28 07:23:35 Subject: [PATCH] fixed bug in series deletion --- diff --git a/src/barchart/bar.cpp b/src/barchart/bar.cpp index 4fec7bc..dc3022d 100644 --- a/src/barchart/bar.cpp +++ b/src/barchart/bar.cpp @@ -36,21 +36,21 @@ void Bar::mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_UNUSED(event) emit clicked(m_barset, m_index); - //TODO:: emit clicked(m_index); + emit clicked(m_index); } void Bar::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event) emit hovered(m_barset, true); - //TODO::emit hovered(true); + emit hovered(true); } void Bar::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event) emit hovered(m_barset, false); - //TODO::emit hovered(false); + emit hovered(false); } #include "moc_bar_p.cpp" diff --git a/src/chartpresenter.cpp b/src/chartpresenter.cpp index af8b35b..0cc8da9 100644 --- a/src/chartpresenter.cpp +++ b/src/chartpresenter.cpp @@ -103,7 +103,7 @@ void ChartPresenter::handleAxisRemoved(QAbstractAxis* axis) ChartAxis* item = m_axisItems.take(axis); Q_ASSERT(item); if(m_animator) m_animator->removeAnimation(item); - delete item; + item->deleteLater(); } @@ -135,7 +135,7 @@ void ChartPresenter::handleSeriesRemoved(QAbstractSeries* series) }else m_animator->removeAnimation(item); } - delete item; + item->deleteLater(); } void ChartPresenter::setTheme(QChart::ChartTheme theme,bool force)