summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2015-08-18 10:03:51 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-18 06:42:01 -0700
commit72806e42bc23ab7c7f2a639a1efee017388b53bc (patch)
treef367ec161dec60ad7247322cd8a603fc4a3a91d1 /qt-ui/mainwindow.cpp
parent4e89a6020ec02fdc7a7af9b59ef918cb610f5a76 (diff)
downloadsubsurface-72806e42bc23ab7c7f2a639a1efee017388b53bc.tar.gz
Replace global in_planner variable by helper function
as promised earlier Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index f22884a84..1a12305d9 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -1716,7 +1716,6 @@ void MainWindow::setApplicationState(const QByteArray& state) {
return;
currentApplicationState = state;
- in_planner = (state == "PlanDive" || state == "EditPlannedDive");
#define SET_CURRENT_INDEX( X ) \
if (applicationState[state].X) { \
@@ -1732,3 +1731,8 @@ void MainWindow::setApplicationState(const QByteArray& state) {
SET_CURRENT_INDEX( bottomRight )
#undef SET_CURRENT_INDEX
}
+
+bool MainWindow::inPlanner()
+{
+ return (currentApplicationState == "PlanDive" || currentApplicationState == "EditPlannedDive");
+}