diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2015-06-07 10:29:17 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-07 08:04:37 -0700 |
commit | d9801b67b4dc7b925b356d2574cafaa03e598a3b (patch) | |
tree | 906d3da0c957140de84da9fc442f45fa9caa76ae /qt-ui/maintab.cpp | |
parent | 09172ddfa432ee4213fb85ef36b058b498ae9174 (diff) | |
download | subsurface-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>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r-- | qt-ui/maintab.cpp | 1 |
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, ¤t_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 |