1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-18 19:52:09 +01:00

Fixed bounds check

This commit is contained in:
Martin Tůma 2016-11-18 09:23:43 +01:00
parent dec3f10df3
commit 80bc9f1f01

View File

@ -117,7 +117,7 @@ void GraphItem::emitSliderPositionChanged(qreal pos)
{
if (_type == Time) {
if (_graph.hasTime()) {
if (pos <= _graph.last().t())
if (pos >= _graph.first().t() && pos <= _graph.last().t())
emit sliderPositionChanged(distanceAtTime(pos));
else
emit sliderPositionChanged(_graph.last().s() + 1);