diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/diveplanner.cpp | 6 | ||||
-rw-r--r-- | qt-ui/mainwindow.cpp | 9 | ||||
-rw-r--r-- | qt-ui/mainwindow.h | 1 | ||||
-rw-r--r-- | qt-ui/plannerSettings.ui | 3 |
4 files changed, 11 insertions, 8 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 82ecb05dc..7f0d129a2 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -228,6 +228,8 @@ void PlannerSettingsWidget::disableDecoElements(int mode) ui.decopo2->setDisabled(true); ui.reserve_gas->setDisabled(false); ui.conservatism_lvl->setDisabled(true); + ui.switch_at_req_stop->setDisabled(true); + ui.min_switch_duration->setDisabled(true); } else if (mode == VPMB) { ui.gflow->setDisabled(true); @@ -238,6 +240,8 @@ void PlannerSettingsWidget::disableDecoElements(int mode) ui.decopo2->setDisabled(false); ui.reserve_gas->setDisabled(true); ui.conservatism_lvl->setDisabled(false); + ui.switch_at_req_stop->setDisabled(false); + ui.min_switch_duration->setDisabled(false); } else if (mode == BUEHLMANN) { ui.gflow->setDisabled(false); @@ -248,6 +252,8 @@ void PlannerSettingsWidget::disableDecoElements(int mode) ui.decopo2->setDisabled(false); ui.reserve_gas->setDisabled(true); ui.conservatism_lvl->setDisabled(true); + ui.switch_at_req_stop->setDisabled(false); + ui.min_switch_duration->setDisabled(false); } } diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index dec550389..4d416d2be 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -1731,10 +1731,10 @@ void MainWindow::setApplicationState(const QByteArray& state) { if (!applicationState.keys().contains(state)) return; - if (currentApplicationState == state) + if (getCurrentAppState() == state) return; - currentApplicationState = state; + setCurrentAppState(state); #define SET_CURRENT_INDEX( X ) \ if (applicationState[state].X) { \ @@ -1762,8 +1762,3 @@ void MainWindow::setApplicationState(const QByteArray& state) { } #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 2d2ea8847..226e9b6ee 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -243,7 +243,6 @@ private: QHash<QByteArray, WidgetForQuadrant> applicationState; QHash<QByteArray, PropertiesForQuadrant> stateProperties; - QByteArray currentApplicationState; WindowTitleUpdate *wtu; }; diff --git a/qt-ui/plannerSettings.ui b/qt-ui/plannerSettings.ui index 4ebc868af..54ea5762c 100644 --- a/qt-ui/plannerSettings.ui +++ b/qt-ui/plannerSettings.ui @@ -491,6 +491,9 @@ <property name="text"> <string>Conservatism level</string> </property> + <property name="indent"> + <number>25</number> + </property> </widget> </item> <item row="12" column="2"> |