mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
490c7a0645
commit
2744714970
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue