From fedadc65dbf84164a079f1d9f402290c5e210537 Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Sun, 15 Jan 2017 20:12:51 +0100 Subject: Prevent the heatmap form overlapping at the ends ...by making the pen start at its first position rather than first position minus half width. Sorry for my first attempt to solve this in a totally differen (read: wrong) way. Signed-off-by: Robert C. Helling --- profile-widget/diveprofileitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'profile-widget/diveprofileitem.cpp') diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp index c3c716539..c1c98ee14 100644 --- a/profile-widget/diveprofileitem.cpp +++ b/profile-widget/diveprofileitem.cpp @@ -416,7 +416,7 @@ void DivePercentageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem return; painter->save(); QPen mypen; - mypen.setWidthF(vAxis->posAtValue(0) - vAxis->posAtValue(4)); + mypen.setCapStyle(Qt::FlatCap); mypen.setCosmetic(false); QPolygonF poly = polygon(); for (int i = 1, modelDataCount = dataModel->rowCount(); i < modelDataCount; i++) { -- cgit v1.2.3-70-g09d2