mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fixing some issues with the dive selection after OK on preferences
These changes should be correct - but they still don't fix the problem that after we click 'OK' on the preferences (regardless of whether any changes were made), the first dive is set as current dive and shown in the map window. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b115423aa1
commit
4d937051ca
2 changed files with 2 additions and 2 deletions
|
@ -157,7 +157,7 @@ void DiveListView::reload(DiveTripModel::Layout layout, bool forceSort)
|
|||
|
||||
sortByColumn(0, Qt::DescendingOrder);
|
||||
if (amount_selected && selected_dive >= 0) {
|
||||
// magic happens and the selected dive is expanded and scrolled to
|
||||
selectDive(current_dive, true);
|
||||
} else {
|
||||
QModelIndex firstDiveOrTrip = m->index(0,0);
|
||||
if (firstDiveOrTrip.isValid()) {
|
||||
|
|
|
@ -58,7 +58,7 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow()), helpView(0)
|
|||
// this gets called after we download dives from a divecomputer
|
||||
void MainWindow::refreshDisplay()
|
||||
{
|
||||
if (!selected_dive)
|
||||
if (selected_dive == -1)
|
||||
current_dive_changed(dive_table.nr - 1);
|
||||
ui->ListWidget->reload();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue