From d9abf885c2ef7861ca85a52eec3c01e0c04861d5 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 26 May 2014 18:20:40 -0300 Subject: Better movements from the lines when added / removed. This makes the movements from the lines when added / removed SO much better. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/profile/divecartesianaxis.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qt-ui/profile') diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp index 25b8a55a7..d4ba92bbd 100644 --- a/qt-ui/profile/divecartesianaxis.cpp +++ b/qt-ui/profile/divecartesianaxis.cpp @@ -234,11 +234,13 @@ void DiveCartesianAxis::updateTicks(color_indice_t color) lines.push_back(line); if (orientation == RightToLeft || orientation == LeftToRight) { line->setLine(0, -line_size, 0, 0); + line->setPos(scene()->sceneRect().width() + 10, m.y1()); // position it outside of the scene); line->animateMoveTo(childPos, m.y1()); } else { QPointF p1 = mapFromScene(3, 0); QPointF p2 = mapFromScene(line_size, 0); line->setLine(p1.x(), 0, p2.x(), 0); + line->setPos(m.x1(), scene()->sceneRect().height() + 10); line->animateMoveTo(m.x1(), childPos); } } -- cgit v1.2.3-70-g09d2