undo: implement ApplyGPSFixes undo command

This gets a list of dives with GPS fixes and
1) Adds new dive sites if the dive hasn't a dive site set
2) Edits the location of the dive site

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2019-11-16 21:35:26 +01:00 committed by Dirk Hohndel
parent 89047b3541
commit 93bdaa9bb5
4 changed files with 81 additions and 1 deletions

View file

@ -145,6 +145,11 @@ void purgeUnusedDiveSites()
execute(new PurgeUnusedDiveSites);
}
void applyGPSFixes(const std::vector<DiveAndLocation> &fixes)
{
execute(new ApplyGPSFixes(fixes));
}
// Execute an edit-command and return number of edited dives
static int execute_edit(EditDivesBase *cmd)
{