From e16b58ee0853ac8fb1a78b7a9615d32a658a5da6 Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Mon, 1 Jan 2018 21:54:38 +0100 Subject: [PATCH] Desktop: follow autogroup setting in UI When importing a dive (using import from logfile) and it is a ssrf/xml file that contains the autogroup setting, the autogroup is effectuated in the dive list. Not sure that I like this behavior, but thats the way it currently is. Simply wrong is that in this case the menu item toggle is not adapted so we end up with a dive list that is autogrouped, but the menu toggle is off. This can be solved by setting the UI toggle in a more central location. Signed-off-by: Jan Mulder --- desktop-widgets/mainwindow.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index ddd0f7eb9..06f1e0df1 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -475,6 +475,7 @@ void MainWindow::refreshDisplay(bool doRecreateDiveList) dive_list()->setEnabled(true); dive_list()->setFocus(); WSInfoModel::instance()->updateInfo(); + ui.actionAutoGroup->setChecked(autogroup); if (amount_selected == 0) cleanUpEmpty(); } @@ -615,7 +616,6 @@ void MainWindow::on_actionCloudstorageopen_triggered() process_dives(false, false); hideProgressBar(); refreshDisplay(); - ui.actionAutoGroup->setChecked(autogroup); } void MainWindow::on_actionCloudstoragesave_triggered() @@ -1802,7 +1802,6 @@ void MainWindow::loadFiles(const QStringList fileNames) process_dives(false, false); refreshDisplay(); - ui.actionAutoGroup->setChecked(autogroup); int min_datafile_version = get_min_datafile_version(); if (min_datafile_version >0 && min_datafile_version < DATAFORMAT_VERSION) {