mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
desktop: fix editing of trips
In 2021035cfc
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue