diff options
Diffstat (limited to 'qt-ui/profile/diveprofileitem.cpp')
-rw-r--r-- | qt-ui/profile/diveprofileitem.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp index e7cf7cf03..9aa204808 100644 --- a/qt-ui/profile/diveprofileitem.cpp +++ b/qt-ui/profile/diveprofileitem.cpp @@ -113,12 +113,13 @@ void DiveProfileItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* o QPen pen; pen.setCosmetic(true); pen.setWidth(2); + QPolygonF poly = polygon(); // This paints the colors of the velocities. for (int i = 1, count = dataModel->rowCount(); i < count; i++) { QModelIndex colorIndex = dataModel->index(i, DivePlotDataModel::COLOR); pen.setBrush(QBrush(colorIndex.data(Qt::BackgroundRole).value<QColor>())); painter->setPen(pen); - painter->drawLine(polygon()[i-1],polygon()[i]); + painter->drawLine(poly[i-1],poly[i]); } } |