From 42cff9b3a506d2b52739d8714d5698e1a3b2e3f9 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 13 Feb 2021 22:43:55 +0100 Subject: 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 --- core/qthelper.cpp | 5 ----- core/qthelper.h | 1 - 2 files changed, 6 deletions(-) (limited to 'core') 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(); -- cgit v1.2.3-70-g09d2