summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-02-13 22:43:55 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-02-17 07:26:55 -0800
commit42cff9b3a506d2b52739d8714d5698e1a3b2e3f9 (patch)
treef473c21e7d8e056f1630078dc7207c35dd912d54 /core
parent18049bc8d08a4e223a9824efb26b710e6bca1958 (diff)
downloadsubsurface-42cff9b3a506d2b52739d8714d5698e1a3b2e3f9.tar.gz
planner: pass in_planner down to TemplateLayout
The TemplateLayout prints different dives depending on whether the planner is active. Instead of accessing a global variable, pass the status down from the MainWindow. That's all quite convoluted, since there are multiple layers involved. On the positive side, the in_planner() function has now no users an can be removed. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/qthelper.cpp5
-rw-r--r--core/qthelper.h1
2 files changed, 0 insertions, 6 deletions
diff --git a/core/qthelper.cpp b/core/qthelper.cpp
index 2f94be101..d0a6e36db 100644
--- a/core/qthelper.cpp
+++ b/core/qthelper.cpp
@@ -1484,11 +1484,6 @@ extern "C" void parse_display_units(char *line)
qDebug() << line;
}
-extern "C" bool in_planner()
-{
- return getAppState() == ApplicationState::PlanDive || getAppState() == ApplicationState::EditPlannedDive;
-}
-
extern "C" enum deco_mode decoMode(bool in_planner)
{
return in_planner ? prefs.planner_deco_mode : prefs.display_deco_mode;
diff --git a/core/qthelper.h b/core/qthelper.h
index b813408cd..135689c69 100644
--- a/core/qthelper.h
+++ b/core/qthelper.h
@@ -137,7 +137,6 @@ extern "C" {
#endif
char *printGPSCoordsC(const location_t *loc);
-bool in_planner();
bool getProxyString(char **buffer);
bool canReachCloudServer();
void updateWindowTitle();