From 3c1002d7ef83a67db89d52dd7c58b267b3870dc3 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 15 Oct 2018 23:31:38 +0200 Subject: Dowload: Deselect dives only if at least one dive was downloaded On dive-download old dives are deselected and a new one is selected. If no dives were downloaded, accordingly no dives were selected. This deselect only dives if at least one dive was downloaded. Fixes #1793 Reported-by: Jan Mulder Signed-off-by: Berthold Stoeger --- desktop-widgets/downloadfromdivecomputer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/downloadfromdivecomputer.cpp b/desktop-widgets/downloadfromdivecomputer.cpp index 854e77060..3c70d8686 100644 --- a/desktop-widgets/downloadfromdivecomputer.cpp +++ b/desktop-widgets/downloadfromdivecomputer.cpp @@ -523,9 +523,8 @@ void DownloadFromDCWidget::on_ok_clicked() delete_dive_from_table(&downloadTable, j); } - MainWindow::instance()->diveList->unselectDives(); - if (downloadTable.nr > 0) { + MainWindow::instance()->diveList->unselectDives(); // remember the last downloaded dive (on most dive computers this will be the chronologically // first new dive) and select it again after processing all the dives int uniqId = downloadTable.dives[downloadTable.nr - 1]->id; -- cgit v1.2.3-70-g09d2