diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 25c46a7b4..a513133d0 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -151,8 +151,6 @@ MainWindow::MainWindow() : { diveList.get(), FLAG_NONE }, { mapWidget.get(), FLAG_NONE } }); registerApplicationState(ApplicationState::PlanDive, { false, { &plannerWidgets->plannerWidget, FLAG_NONE }, { profile.get(), FLAG_NONE }, { &plannerWidgets->plannerSettingsWidget, FLAG_NONE }, { &plannerWidgets->plannerDetails, FLAG_NONE } }); - registerApplicationState(ApplicationState::EditPlannedDive, { true, { &plannerWidgets->plannerWidget, FLAG_NONE }, { profile.get(), FLAG_NONE }, - { diveList.get(), FLAG_NONE }, { mapWidget.get(), FLAG_NONE } }); registerApplicationState(ApplicationState::EditDiveSite, { false, { diveSiteEdit.get(), FLAG_NONE }, { profile.get(), FLAG_DISABLED }, { diveList.get(), FLAG_DISABLED }, { mapWidget.get(), FLAG_NONE } }); registerApplicationState(ApplicationState::FilterDive, { true, { mainTab.get(), FLAG_NONE }, { profile.get(), FLAG_NONE }, @@ -550,7 +548,7 @@ void MainWindow::updateLastUsedDir(const QString &dir) void MainWindow::on_actionPrint_triggered() { #ifndef NO_PRINTING - bool in_planner = appState == ApplicationState::PlanDive || appState == ApplicationState::EditPlannedDive; + bool in_planner = inPlanner(); PrintDialog dlg(in_planner, this); dlg.exec(); diff --git a/desktop-widgets/mainwindow.h b/desktop-widgets/mainwindow.h index 316fdd6e4..8055f2142 100644 --- a/desktop-widgets/mainwindow.h +++ b/desktop-widgets/mainwindow.h @@ -56,7 +56,6 @@ public: enum class ApplicationState { Default, PlanDive, - EditPlannedDive, EditDiveSite, FilterDive, Statistics,