summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-10-15 23:31:38 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-15 20:55:58 -0400
commit3c1002d7ef83a67db89d52dd7c58b267b3870dc3 (patch)
treeb87622be40036be16b3a786cf775d1ed7591477f /desktop-widgets
parent813c5705242de74e7770e79c8d50a2041c486e35 (diff)
downloadsubsurface-3c1002d7ef83a67db89d52dd7c58b267b3870dc3.tar.gz
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 <jlmulder@xs4all.nl> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/downloadfromdivecomputer.cpp3
1 files changed, 1 insertions, 2 deletions
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;