mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
813c570524
commit
3c1002d7ef
1 changed files with 1 additions and 2 deletions
|
@ -523,9 +523,8 @@ void DownloadFromDCWidget::on_ok_clicked()
|
||||||
delete_dive_from_table(&downloadTable, j);
|
delete_dive_from_table(&downloadTable, j);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::instance()->diveList->unselectDives();
|
|
||||||
|
|
||||||
if (downloadTable.nr > 0) {
|
if (downloadTable.nr > 0) {
|
||||||
|
MainWindow::instance()->diveList->unselectDives();
|
||||||
// remember the last downloaded dive (on most dive computers this will be the chronologically
|
// 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
|
// first new dive) and select it again after processing all the dives
|
||||||
int uniqId = downloadTable.dives[downloadTable.nr - 1]->id;
|
int uniqId = downloadTable.dives[downloadTable.nr - 1]->id;
|
||||||
|
|
Loading…
Add table
Reference in a new issue