1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +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;
QGraphicsPathItem *pi;
QColor color = _palette.color();
if (data.size() < 2)
@ -145,7 +144,7 @@ void GraphView::loadData(const QVector<QPointF> &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);

View File

@ -48,7 +48,6 @@ void TrackView::addTrack(const QVector<QPointF> &track)
QPainterPath path;
QGraphicsPathItem *pi;
MarkerItem *mi;
QColor color = _palette.color();
if (track.size() < 2)
@ -67,7 +66,7 @@ void TrackView::addTrack(const QVector<QPointF> &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);