diff options
-rw-r--r-- | qt-ui/profile/ruleritem.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/profile/ruleritem.cpp b/qt-ui/profile/ruleritem.cpp index 0bf97f947..d38e88822 100644 --- a/qt-ui/profile/ruleritem.cpp +++ b/qt-ui/profile/ruleritem.cpp @@ -61,7 +61,10 @@ void RulerNodeItem2::recalculate() void RulerNodeItem2::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { - setPos(event->scenePos()); + qreal x = event->scenePos().x(); + if (x < 0.0) + x = 0.0; + setPos(x, event->scenePos().y()); recalculate(); ruler->recalculate(); } |