mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-26 00:14:24 +02:00
Fixed graph bounds issue
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
#include <cmath>
|
||||
#include <QApplication>
|
||||
#include <QCursor>
|
||||
#include <QPainter>
|
||||
@ -108,12 +109,11 @@ QPointF PathItem::position(qreal x) const
|
||||
|
||||
void PathItem::moveMarker(qreal distance)
|
||||
{
|
||||
if (distance > _distance.last())
|
||||
_marker->setVisible(false);
|
||||
else {
|
||||
if (distance >= _distance.first() && distance <= _distance.last()) {
|
||||
_marker->setVisible(true);
|
||||
_marker->setPos(position(distance));
|
||||
}
|
||||
} else
|
||||
_marker->setVisible(false);
|
||||
}
|
||||
|
||||
void PathItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
|
Reference in New Issue
Block a user