Update the current dive when no dive was selected
The check to only update the dive if there were already dives selected before seems bogus. I'm sure I put it there for a reason but it seems flat out wrong. This gets triggered when you select a trip by clicking on the trip header. In that case all dives get unselected (amount_selected = 0) and then we try to select the first dive in the trip - which fails because of this check. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
87decaa798
commit
ca1c112424
@ -65,7 +65,7 @@ void MainWindow::refreshDisplay()
|
||||
|
||||
void MainWindow::current_dive_changed(int divenr)
|
||||
{
|
||||
if (amount_selected && divenr >= 0) {
|
||||
if (divenr >= 0) {
|
||||
select_dive(divenr);
|
||||
ui->globe->centerOn(get_dive(selected_dive));
|
||||
redrawProfile();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user