diff --git a/src/data/graph.h b/src/data/graph.h index a2be43e6..28479487 100644 --- a/src/data/graph.h +++ b/src/data/graph.h @@ -54,6 +54,7 @@ public: return false; return true; } + bool hasTime() const { for (int i = 0; i < size(); i++) { diff --git a/src/data/route.cpp b/src/data/route.cpp index b0bb5cb1..c2affe46 100644 --- a/src/data/route.cpp +++ b/src/data/route.cpp @@ -1,4 +1,3 @@ -#include "dem.h" #include "route.h" diff --git a/src/data/track.cpp b/src/data/track.cpp index 080fd789..e28e21d9 100644 --- a/src/data/track.cpp +++ b/src/data/track.cpp @@ -1,4 +1,3 @@ -#include "dem.h" #include "track.h" @@ -177,7 +176,7 @@ Graph Track::elevation() const GraphSegment gs; for (int j = 0; j < sd.size(); j++) { - if (seg.outliers.contains(j)) + if (!sd.at(j).hasElevation() || seg.outliers.contains(j)) continue; gs.append(GraphPoint(seg.distance.at(j), seg.time.at(j), sd.at(j).elevation()));