mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-05 15:12:51 +02:00
Fixed some corner case min/max graph values issue
This commit is contained in:
@ -13,6 +13,13 @@ SpeedGraphItem::SpeedGraphItem(const Graph &graph, GraphType type,
|
||||
_avg = graph.last().s() / graph.last().t();
|
||||
_mavg = graph.last().s() / movingTime;
|
||||
|
||||
_max = graph.first().y();
|
||||
for (int i = 1; i < graph.size(); i++) {
|
||||
qreal y = graph.at(i).y();
|
||||
if (y > _max)
|
||||
_max = y;
|
||||
}
|
||||
|
||||
setToolTip(toolTip());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user