diff options
Diffstat (limited to 'desktop-widgets/tab-widgets')
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index 00f9d6ad4..7204cd7b0 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -365,7 +365,8 @@ void MainTab::updateDiveInfo() // 2) the filter is reset, potentially erasing the current trip under our feet. // TODO: Don't hard code tab location! bool onDiveSiteTab = ui.tabWidget->currentIndex() == 6; - if ((currentTrip = MainWindow::instance()->diveList->singleSelectedTrip()) != nullptr) { + currentTrip = single_selected_trip(); + if (currentTrip) { // Remember the tab selected for last dive but only if we're not on the dive site tab if (lastSelectedDive && !onDiveSiteTab) lastTabSelectedDive = ui.tabWidget->currentIndex(); @@ -412,7 +413,6 @@ void MainTab::updateDiveInfo() if (!lastSelectedDive && !onDiveSiteTab) ui.tabWidget->setCurrentIndex(lastTabSelectedDive); lastSelectedDive = true; - currentTrip = NULL; // make all the fields visible writeable ui.diveTripLocation->hide(); ui.location->show(); |