1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-27 21:24:47 +01:00

Fixed broken palette handling

This commit is contained in:
Martin Tůma 2016-03-03 19:45:04 +01:00
parent 919d53ade9
commit 209f58412a
2 changed files with 2 additions and 4 deletions

View File

@ -131,7 +131,6 @@ void GraphView::loadData(const QVector<QPointF> &data)
{ {
QPainterPath path; QPainterPath path;
QGraphicsPathItem *pi; QGraphicsPathItem *pi;
QColor color = _palette.color();
if (data.size() < 2) if (data.size() < 2)
@ -145,7 +144,7 @@ void GraphView::loadData(const QVector<QPointF> &data)
} }
pi = new QGraphicsPathItem(path); pi = new QGraphicsPathItem(path);
QBrush brush(color, Qt::SolidPattern); QBrush brush(_palette.color(), Qt::SolidPattern);
QPen pen(brush, 0); QPen pen(brush, 0);
pi->setPen(pen); pi->setPen(pen);
_scene->addItem(pi); _scene->addItem(pi);

View File

@ -48,7 +48,6 @@ void TrackView::addTrack(const QVector<QPointF> &track)
QPainterPath path; QPainterPath path;
QGraphicsPathItem *pi; QGraphicsPathItem *pi;
MarkerItem *mi; MarkerItem *mi;
QColor color = _palette.color();
if (track.size() < 2) if (track.size() < 2)
@ -67,7 +66,7 @@ void TrackView::addTrack(const QVector<QPointF> &track)
_trackPaths.append(pi); _trackPaths.append(pi);
_zoom = scale2zoom(trackScale()); _zoom = scale2zoom(trackScale());
_scale = mapScale(); _scale = mapScale();
QBrush brush(color, Qt::SolidPattern); QBrush brush(_palette.color(), Qt::SolidPattern);
QPen pen(brush, TRACK_WIDTH * _scale); QPen pen(brush, TRACK_WIDTH * _scale);
pi->setPen(pen); pi->setPen(pen);
pi->setScale(1.0/_scale); pi->setScale(1.0/_scale);