summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Jan Mulder <jlmulder@xs4all.nl>2018-01-01 21:54:38 +0100
committerGravatar mturkia <miika.turkia@gmail.com>2018-01-02 06:47:53 +0200
commite16b58ee0853ac8fb1a78b7a9615d32a658a5da6 (patch)
tree7cdd0ae00235ba6900c876ed14aa1fada5c589bd /desktop-widgets/mainwindow.cpp
parentac505600f31fa23ddf87965caea9313e764456f8 (diff)
downloadsubsurface-e16b58ee0853ac8fb1a78b7a9615d32a658a5da6.tar.gz
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 <jlmulder@xs4all.nl>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp3
1 files changed, 1 insertions, 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) {