##// END OF EJS Templates
Revert previous change to LineChartItem...
Titta Heikkala -
r2818:d27e6a35ae04
parent child
Show More
@@ -70,7 +70,10 QPainterPath LineChartItem::shape() const
70 70
71 71 void LineChartItem::updateGeometry()
72 72 {
73 const QVector<QPointF> &points = geometryPoints();
73 // Store the points to a local variable so that the old line gets properly cleared
74 // when animation starts.
75 m_linePoints = geometryPoints();
76 const QVector<QPointF> &points = m_linePoints;
74 77
75 78 if (points.size() == 0) {
76 79 prepareGeometryChange();
@@ -377,8 +380,8 void LineChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt
377 380 // to ensure proper continuity of the pattern
378 381 painter->drawPath(m_linePath);
379 382 } else {
380 for (int i(1); i < m_points.size(); i++)
381 painter->drawLine(m_points.at(i - 1), m_points.at(i));
383 for (int i(1); i < m_linePoints.size(); i++)
384 painter->drawLine(m_linePoints.at(i - 1), m_linePoints.at(i));
382 385 }
383 386 }
384 387
@@ -389,7 +392,7 void LineChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt
389 392 painter->setClipping(true);
390 393 else
391 394 painter->setClipping(false);
392 m_series->d_func()->drawSeriesPointLabels(painter, m_points, m_linePen.width() / 2);
395 m_series->d_func()->drawSeriesPointLabels(painter, m_linePoints, m_linePen.width() / 2);
393 396 }
394 397
395 398 painter->restore();
@@ -74,6 +74,7 private:
74 74 QPainterPath m_fullPath;
75 75 QPainterPath m_shapePath;
76 76
77 QVector<QPointF> m_linePoints;
77 78 QRectF m_rect;
78 79 QPen m_linePen;
79 80 bool m_pointsVisible;
General Comments 0
You need to be logged in to leave comments. Login now