summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/divecartesianaxis.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-26 18:20:40 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-26 15:39:04 -0700
commitd9abf885c2ef7861ca85a52eec3c01e0c04861d5 (patch)
tree882e70fddb3eeb601646ac3263b31953f8d25ab9 /qt-ui/profile/divecartesianaxis.cpp
parent0d58cfb6411080053e99b0caa042278c19441b9d (diff)
downloadsubsurface-d9abf885c2ef7861ca85a52eec3c01e0c04861d5.tar.gz
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 <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/divecartesianaxis.cpp')
-rw-r--r--qt-ui/profile/divecartesianaxis.cpp2
1 files changed, 2 insertions, 0 deletions
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);
}
}