only set index if we have specific target

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-04-27 05:51:14 -07:00
parent 15431f418e
commit 3946f83ff2

View file

@ -433,8 +433,6 @@ void QMLManager::consumeFinishedLoad(timestamp_t currentDiveTimestamp)
DiveListModel::instance()->addAllDives();
if (currentDiveTimestamp)
setUpdateSelectedDive(dlSortModel->getIdxForId(get_dive_id_closest_to(currentDiveTimestamp)));
else
setUpdateSelectedDive(0);
appendTextToLog(QStringLiteral("%1 dives loaded").arg(dive_table.nr));
if (dive_table.nr == 0)
setStartPageText(tr("Cloud storage open successfully. No dives in dive list."));