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

Fixed broken track/route handling in some corner cases

This commit is contained in:
Martin Tůma 2016-08-10 22:16:39 +02:00
parent 1e6925da75
commit 9f0582cbea
4 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,7 @@ public:
qreal distance() const;
bool isNull() const {return _dd.isEmpty();}
bool isNull() const {return (_dd.count() < 2);}
private:
const QVector<Waypoint> &_data;

View File

@ -12,7 +12,7 @@ RouteItem::RouteItem(const Route &route, QGraphicsItem *parent)
{
WaypointItem *wi;
const QVector<Waypoint> &r = route.route();
QVector<Waypoint> r = route.route();
Q_ASSERT(r.count() >= 2);
wi = new WaypointItem(r.at(0));

View File

@ -20,7 +20,7 @@ public:
qreal time() const;
QDateTime date() const;
bool isNull() const {return _dd.isEmpty();}
bool isNull() const {return (_dd.count() < 2);}
private:
const QVector<Trackpoint> &_data;

View File

@ -28,13 +28,13 @@ void TrackItem::updateShape()
{
QPainterPathStroker s;
s.setWidth(TRACK_WIDTH * 1.0/scale());
_shape = s.createStroke(_path.simplified());
_shape = s.createStroke(_path);
}
TrackItem::TrackItem(const Track &track, QGraphicsItem *parent)
: QGraphicsItem(parent)
{
const QVector<QPointF> &t = track.track();
QVector<QPointF> t = track.track();
Q_ASSERT(t.count() >= 2);
const QPointF &p = t.at(0);