diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-02-13 17:42:03 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-02-17 07:26:55 -0800 |
commit | c6d78bc134870fa2d9361b3f928451b7ab915043 (patch) | |
tree | 305ca5af1f55d3aefd918cc7ad73b806ef88af53 /profile-widget/profilewidget2.cpp | |
parent | 65720d2fcef50ad66c741eba1c3c00bb01b74671 (diff) | |
download | subsurface-c6d78bc134870fa2d9361b3f928451b7ab915043.tar.gz |
planner: pass in_planner argument to replot()
To remove reliance on global state, pass an "in_planner" argument
to AbstractProfilePolygonItem::replot(). Thus, calls to in_planner()
can be removed.
This is a bit sad, since the in_planner argument is now passed
to numerous replot() reimplementations of classes derived
from AbstractProfilePolygonItem. However, it is only needed
for one, viz. DiveGasPressureItem. Well, perhaps in the future
more features will depend on the planner mode...
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r-- | profile-widget/profilewidget2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 62a14ea5d..0808e2932 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -728,7 +728,7 @@ void ProfileWidget2::plotDive(const struct dive *d, bool force, bool doClearPict // Replot dive items for (AbstractProfilePolygonItem *item: profileItems) - item->replot(&displayed_dive); + item->replot(&displayed_dive, currentState == PLAN); // 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 |