From 810e912b2c05d5f4305b0f1e56be57e765a30479 2015-01-13 08:32:23 From: Andy Shaw Date: 2015-01-13 08:32:23 Subject: [PATCH] Use the points variable passed in rather than the class member Change-Id: Ib62a9e936f35fbd0e1b328060908e86a23620a2f Reviewed-by: Titta Heikkala --- diff --git a/src/charts/xychart/qxyseries.cpp b/src/charts/xychart/qxyseries.cpp index df52717..6a70cb7 100644 --- a/src/charts/xychart/qxyseries.cpp +++ b/src/charts/xychart/qxyseries.cpp @@ -840,10 +840,10 @@ void QXYSeriesPrivate::drawSeriesPointLabels(QPainter *painter, const QVectorsetPen(QPen(m_pointLabelsColor)); QFontMetrics fm(painter->font()); - for (int i(0); i < m_points.size(); i++) { + for (int i(0); i < points.size(); i++) { QString pointLabel = m_pointLabelsFormat; - pointLabel.replace(xPointTag, presenter()->numberToString(m_points.at(i).x())); - pointLabel.replace(yPointTag, presenter()->numberToString(m_points.at(i).y())); + pointLabel.replace(xPointTag, presenter()->numberToString(points.at(i).x())); + pointLabel.replace(yPointTag, presenter()->numberToString(points.at(i).y())); // Position text in relation to the point int pointLabelWidth = fm.width(pointLabel);