diff options
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 95b714d00..2a198110e 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -403,11 +403,11 @@ void MainWindow::enableDisableOtherDCsActions() ui.actionPreviousDC->setEnabled(nr); } -void MainWindow::setDefaultState() { +void MainWindow::setDefaultState() +{ setApplicationState("Default"); - if (mainTab->getEditMode() != MainTab::NONE) { + if (mainTab->getEditMode() != MainTab::NONE) ui.bottomLeft->currentWidget()->setEnabled(false); - } } MainWindow *MainWindow::instance() @@ -437,7 +437,8 @@ void MainWindow::recreateDiveList() MultiFilterSortModel::instance()->myInvalidate(); } -void MainWindow::configureToolbar() { +void MainWindow::configureToolbar() +{ if (current_dive) { bool freeDiveMode = current_dive->dc.divemode == FREEDIVE; ui.profCalcCeiling->setDisabled(freeDiveMode); @@ -1839,7 +1840,8 @@ void MainWindow::registerApplicationState(const QByteArray& state, QWidget *topL } } -void MainWindow::setApplicationState(const QByteArray& state) { +void MainWindow::setApplicationState(const QByteArray &state) +{ if (!applicationState.keys().contains(state)) return; |