mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive d/l selection UI: don't setup the model if there are no dives
Setting things up for zero dives will cause all kinds of weird corner cases. Just don't do it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
037d1ceefa
commit
e9e6e75feb
1 changed files with 1 additions and 1 deletions
|
@ -403,7 +403,7 @@ void DownloadFromDCWidget::onDownloadThreadFinished()
|
|||
// down in the dive_table
|
||||
for (int i = dive_table.nr - 1; i >= previousLast; i--)
|
||||
delete_single_dive(i);
|
||||
} else if (dive_table.nr) {
|
||||
} else if (dive_table.nr && previousLast < dive_table.nr) {
|
||||
diveImportedModel->setImportedDivesIndexes(previousLast, dive_table.nr - 1);
|
||||
}
|
||||
} else if (currentState == CANCELLING || currentState == CANCELLED) {
|
||||
|
|
Loading…
Add table
Reference in a new issue