summaryrefslogtreecommitdiffstats
path: root/profile-widget/ruleritem.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-09 18:25:04 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-10 15:57:39 -0800
commit88c6ce988dfc1b5ad40eb9c425d705c8ac136570 (patch)
tree49a7642f6fa40b2a8a3e65e9d4ebc48dfc51e29a /profile-widget/ruleritem.h
parent54e8fe5d9e588c3345ded27982edaf72654fc8d1 (diff)
downloadsubsurface-88c6ce988dfc1b5ad40eb9c425d705c8ac136570.tar.gz
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>
Diffstat (limited to 'profile-widget/ruleritem.h')
-rw-r--r--profile-widget/ruleritem.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/profile-widget/ruleritem.h b/profile-widget/ruleritem.h
index 14cdbe36f..182303c17 100644
--- a/profile-widget/ruleritem.h
+++ b/profile-widget/ruleritem.h
@@ -36,7 +36,7 @@ public:
explicit RulerItem2();
void recalculate();
- void setPlotInfo(const struct plot_info &pInfo);
+ void setPlotInfo(const struct dive *d, const struct plot_info &pInfo);
RulerNodeItem2 *sourceNode() const;
RulerNodeItem2 *destNode() const;
void setAxis(DiveCartesianAxis *time, DiveCartesianAxis *depth);
@@ -47,6 +47,7 @@ slots:
void settingsChanged(bool toggled);
private:
+ const struct dive *dive;
struct plot_info pInfo;
QPointF startPoint, endPoint;
RulerNodeItem2 *source, *dest;