desktop: fold ApplicationState into MainWindow

The application state is a desktop-only thing. The mobile UI
also has its application state, but that is something completely
different.

The last remaining user of the application state was to flag
whether the planner is active. Since this has all been
unglobalized, the ApplicationState structure can be moved
from core to the desktop UI. And there it can be made local
to the MainWindow class.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-02-14 20:59:02 +01:00 committed by Dirk Hohndel
parent 80c92acc33
commit 5b3cb5898f
10 changed files with 27 additions and 56 deletions

View file

@ -219,7 +219,7 @@ void LocationInformationWidget::acceptChanges()
MainWindow::instance()->diveList->setEnabled(true);
MainWindow::instance()->setEnabledToolbar(true);
MainWindow::instance()->setApplicationState(ApplicationState::Default);
MainWindow::instance()->setApplicationState(MainWindow::ApplicationState::Default);
DiveFilter::instance()->stopFilterDiveSites();
// Subtlety alert: diveSite must be cleared *after* exiting the dive-site mode.