From 209f58412a322e0b3fb1d2b85ec289e1bf1b9d23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Thu, 3 Mar 2016 19:45:04 +0100 Subject: [PATCH] Fixed broken palette handling --- src/graphview.cpp | 3 +-- src/trackview.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/graphview.cpp b/src/graphview.cpp index a8ac1cd3..e84766e6 100644 --- a/src/graphview.cpp +++ b/src/graphview.cpp @@ -131,7 +131,6 @@ void GraphView::loadData(const QVector &data) { QPainterPath path; QGraphicsPathItem *pi; - QColor color = _palette.color(); if (data.size() < 2) @@ -145,7 +144,7 @@ void GraphView::loadData(const QVector &data) } pi = new QGraphicsPathItem(path); - QBrush brush(color, Qt::SolidPattern); + QBrush brush(_palette.color(), Qt::SolidPattern); QPen pen(brush, 0); pi->setPen(pen); _scene->addItem(pi); diff --git a/src/trackview.cpp b/src/trackview.cpp index b99dd553..2092e64b 100644 --- a/src/trackview.cpp +++ b/src/trackview.cpp @@ -48,7 +48,6 @@ void TrackView::addTrack(const QVector &track) QPainterPath path; QGraphicsPathItem *pi; MarkerItem *mi; - QColor color = _palette.color(); if (track.size() < 2) @@ -67,7 +66,7 @@ void TrackView::addTrack(const QVector &track) _trackPaths.append(pi); _zoom = scale2zoom(trackScale()); _scale = mapScale(); - QBrush brush(color, Qt::SolidPattern); + QBrush brush(_palette.color(), Qt::SolidPattern); QPen pen(brush, TRACK_WIDTH * _scale); pi->setPen(pen); pi->setScale(1.0/_scale);