summaryrefslogtreecommitdiffstats
path: root/profile-widget/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-09 17:36:48 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-10 15:57:39 -0800
commit193513a61fc7fcfb31c1cb969f7fe05452abd67c (patch)
treef03f35cc5c5eb49c43e14d30cbe79ab7a82ada84 /profile-widget/profilewidget2.cpp
parentbe9f9efb0eae6f09db4c61de7a5156b186dc2ad6 (diff)
downloadsubsurface-193513a61fc7fcfb31c1cb969f7fe05452abd67c.tar.gz
profile: pass dive to plot function of profile-items
Instead of accessing the global displayed_dive variable, pass the dive to the various profile items. This is a step in making the profile code reentrant. This removes the last user of the displayed_dc macro, which can now be removed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r--profile-widget/profilewidget2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index c3097ed32..7397d1648 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -737,7 +737,7 @@ void ProfileWidget2::plotDive(const struct dive *d, bool force, bool doClearPict
// Replot dive items
for (AbstractProfilePolygonItem *item: profileItems)
- item->replot();
+ item->replot(&displayed_dive);
// The event items are a bit special since we don't know how many events are going to
// exist on a dive, so I cant create cache items for that. that's why they are here