From 2744714970c6953bed8ae10fd1c00d05b68966f2 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 29 May 2014 23:47:03 -0300 Subject: [PATCH] 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 Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; }