From d9801b67b4dc7b925b356d2574cafaa03e598a3b Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sun, 7 Jun 2015 10:29:17 -0300 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'qt-ui') 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 -- cgit v1.2.3-70-g09d2