summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@gmail.com>2015-06-07 10:29:17 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-07 08:04:37 -0700
commitd9801b67b4dc7b925b356d2574cafaa03e598a3b (patch)
tree906d3da0c957140de84da9fc442f45fa9caa76ae
parent09172ddfa432ee4213fb85ef36b058b498ae9174 (diff)
downloadsubsurface-d9801b67b4dc7b925b356d2574cafaa03e598a3b.tar.gz
Select the correct dive in EditAddedDive mode
If we added two dives, and then tried to edit the first added one, the current 'added dive' set on main_tab would be the second one, so when we got to the accept() part of the call, it would reselect the last added_dive that we had. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/maintab.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 68034fb62..55b01a29f 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -800,6 +800,7 @@ void MainTab::acceptChanges()
// preserve any changes to the profile
free(current_dive->dc.sample);
copy_samples(&displayed_dive.dc, &current_dive->dc);
+ addedId = displayed_dive.id;
}
struct dive *cd = current_dive;
// now check if something has changed and if yes, edit the selected dives that