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:
parent
919d53ade9
commit
209f58412a
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user