profile: pass dive to RulerItem

Instead of accessing the global displayed_dive variable
in RulerItem, pass the dive. This is a step in making the
profile reentrant.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-01-09 18:25:04 +01:00 committed by Dirk Hohndel
parent 54e8fe5d9e
commit 88c6ce988d
5 changed files with 11 additions and 9 deletions

View file

@ -691,7 +691,7 @@ void ProfileWidget2::plotDive(const struct dive *d, bool force, bool doClearPict
cylinderPressureAxis->setMinimum(plotInfo.minpressure);
cylinderPressureAxis->setMaximum(plotInfo.maxpressure);
#ifndef SUBSURFACE_MOBILE
rulerItem->setPlotInfo(plotInfo);
rulerItem->setPlotInfo(&displayed_dive, plotInfo);
#endif
#ifdef SUBSURFACE_MOBILE