diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-07-14 21:44:57 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-14 21:44:57 -0700 |
commit | 95dbfc22ac7508494cc5bc383b7fe804bef3a4e6 (patch) | |
tree | 28e0d8512b5970088886997c582e86e010fe8661 /qt-ui | |
parent | 74bfa1b170846597e9ac302798e44da05b9ed4ae (diff) | |
download | subsurface-95dbfc22ac7508494cc5bc383b7fe804bef3a4e6.tar.gz |
Try to avoid inconsistent selection state after divecomputer download
I cannot reproduce the problem, but adding one more call to
unselectDives() should ensure that all dives are marked as not selected
before selecting the last dive that was downloaded.
See #620
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/downloadfromdivecomputer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index 71f428b14..d2a5fae1c 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -391,6 +391,9 @@ void DownloadFromDCWidget::onDownloadThreadFinished() // to recreate the model for the dive list so we can select the newest dive MainWindow::instance()->recreateDiveList(); idx = get_idx_by_uniq_id(uniqId); + // this shouldn't be necessary - but there are reports that somehow existing dives stay selected + // (but not visible as selected) + MainWindow::instance()->dive_list()->unselectDives(); MainWindow::instance()->dive_list()->selectDive(idx, true); } } else if (currentState == CANCELLING || currentState == CANCELLED) { |