aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp6
-rw-r--r--qt-ui/mainwindow.h1
2 files changed, 6 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");
+}
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h
index 583dc591a..4df1d1238 100644
--- a/qt-ui/mainwindow.h
+++ b/qt-ui/mainwindow.h
@@ -89,6 +89,7 @@ public:
void printPlan();
void checkSurvey(QSettings *s);
void setApplicationState(const QByteArray& state);
+ bool inPlanner();
QUndoStack *undoStack;
NotificationWidget *getNotificationWidget();
void enableDisableCloudActions();