mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Select the first dive
This works regardless whether the first dive is in a trip or not. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0a19a964e0
commit
ce5fc7d0ec
1 changed files with 6 additions and 0 deletions
|
@ -325,6 +325,12 @@ void MainWindow::readSettings()
|
|||
ui->ListWidget->resizeColumnToContents(i);
|
||||
}
|
||||
ui->ListWidget->collapseAll();
|
||||
ui->ListWidget->expand(sortModel->index(0,0));
|
||||
QModelIndex firstDiveOrTrip = sortModel->index(0,0);
|
||||
if (sortModel->index(0,0, firstDiveOrTrip).isValid())
|
||||
ui->ListWidget->setCurrentIndex(sortModel->index(0,0, firstDiveOrTrip));
|
||||
else
|
||||
ui->ListWidget->setCurrentIndex(firstDiveOrTrip);
|
||||
settings.endGroup();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue