desktop: fix editing of trips
In 2021035cfcee08ec4c6f9d16683db8ce400bef30 a bug was introduced: currentTrip of MainTab was not set in trip mode. Thus, when editing the trip notes, the notes of all selected dives were edited instead. Set the member variable and not a local variable. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
e535ac90f9
commit
a8130f0fa1
@ -365,7 +365,7 @@ 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 (dive_trip *currentTrip = MainWindow::instance()->diveList->singleSelectedTrip()) {
|
||||
if ((currentTrip = MainWindow::instance()->diveList->singleSelectedTrip()) != nullptr) {
|
||||
// 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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user