diff --git a/src/route.h b/src/route.h index 2042ba0a..60a654d7 100644 --- a/src/route.h +++ b/src/route.h @@ -14,7 +14,7 @@ public: qreal distance() const; - bool isNull() const {return _dd.isEmpty();} + bool isNull() const {return (_dd.count() < 2);} private: const QVector &_data; diff --git a/src/routeitem.cpp b/src/routeitem.cpp index 0904aa92..6966f7a0 100644 --- a/src/routeitem.cpp +++ b/src/routeitem.cpp @@ -12,7 +12,7 @@ RouteItem::RouteItem(const Route &route, QGraphicsItem *parent) { WaypointItem *wi; - const QVector &r = route.route(); + QVector r = route.route(); Q_ASSERT(r.count() >= 2); wi = new WaypointItem(r.at(0)); diff --git a/src/track.h b/src/track.h index 2c080d88..b8e30828 100644 --- a/src/track.h +++ b/src/track.h @@ -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 &_data; diff --git a/src/trackitem.cpp b/src/trackitem.cpp index 0a363c71..23b4bbd0 100644 --- a/src/trackitem.cpp +++ b/src/trackitem.cpp @@ -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 &t = track.track(); + QVector t = track.track(); Q_ASSERT(t.count() >= 2); const QPointF &p = t.at(0);