mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
65720d2fce
commit
c6d78bc134
3 changed files with 28 additions and 28 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue