aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-29 23:47:03 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-29 20:38:24 -0700
commit2744714970c6953bed8ae10fd1c00d05b68966f2 (patch)
treece5e454931eb11c936ddff8b7f0e1b63741a2768 /qt-ui/profile
parent490c7a06458b5d51c296c497cca44e2a8d49bb2f (diff)
downloadsubsurface-2744714970c6953bed8ae10fd1c00d05b68966f2.tar.gz
Hide the DiveHandlers that are not entered by mouse.
We need to create them, even if we don't display ( only because it was a pain to correctly track them from the model ) - so, hide them if it's not entered by mouse, but a deco one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r--qt-ui/profile/profilewidget2.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 3a5d17664..a196b346a 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -1083,12 +1083,14 @@ void ProfileWidget2::repositionDiveHandlers()
if (datapoint.time == 0) // those are the magic entries for tanks
continue;
DiveHandler *h = handles.at(i);
+ h->setVisible(datapoint.entered);
h->setPos(timeAxis->posAtValue(datapoint.time), profileYAxis->posAtValue(datapoint.depth));
QPointF p1 = (last == i) ? QPointF(timeAxis->posAtValue(0), profileYAxis->posAtValue(0)) : handles[last]->pos();
QPointF p2 = handles[i]->pos();
QLineF line(p1, p2);
QPointF pos = line.pointAt(0.5);
gases[i]->setPos(pos);
+ gases[i]->setVisible(datapoint.entered);
gases[i]->setText(dpGasToStr(plannerModel->at(i)));
last = i;
}