Undo: implement autogrouping of trips in DiveAdd

If the autogroup flag is set, search for appropriate trips in
DiveAdd() and add the dive to this trip. If no trip exists, add
a new trip.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-07-30 10:33:25 +02:00 committed by Dirk Hohndel
parent ec7d85835f
commit 63b65a7e20
7 changed files with 58 additions and 10 deletions

View file

@ -799,7 +799,7 @@ void MainTab::acceptChanges()
updateDiveSite(ui.location->currDiveSiteUuid(), &displayed_dive);
copyTagsToDisplayedDive();
Command::addDive(&displayed_dive);
Command::addDive(&displayed_dive, autogroup);
editMode = NONE;
MainWindow::instance()->exitEditState();