diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-10-27 23:00:16 +0100 |
---|---|---|
committer | Robert C. Helling <helling@atdotde.de> | 2020-11-24 10:54:10 +0100 |
commit | e47b812fd07e8652dd65795510ff13c5657d4baf (patch) | |
tree | 7e4e9e257837b5cc9ff7c129d932aa6abe9ca615 /qt-models/diveplannermodel.cpp | |
parent | f4ef9565a7dca695812870a87e5c25a3605ac5bb (diff) | |
download | subsurface-e47b812fd07e8652dd65795510ff13c5657d4baf.tar.gz |
diveplannermodel: replace in_planner() by isPlanner()
The in_planner() function is problematic, because it depends
on the application state that is only available on desktop.
If we ever want to port the planner to mobile, we have to get
rid of it. Luckily, the DivePlannerModel already has an
appropriate flag that can be used instead.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r-- | qt-models/diveplannermodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 600816f50..0fd7962f3 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -1119,7 +1119,7 @@ void DivePlannerPointsModel::computeVariations(struct diveplan *original_plan, c struct divedatapoint *last_segment; struct deco_state ds = *previous_ds; - if (in_planner() && prefs.display_variations && decoMode() != RECREATIONAL) { + if (isPlanner() && prefs.display_variations && decoMode() != RECREATIONAL) { int my_instance = ++instanceCounter; cache_deco_state(&ds, &save); |