Add undo/redo commands for importing dive sites

ImportDiveSites adds the provided dive sites to the core dive site table
and stores the source data so it can be undone.

Signed-off-by: Doug Junkins <junkins@foghead.com>
This commit is contained in:
Doug Junkins 2019-05-04 20:40:27 -07:00 committed by bstoeger
parent c38a86bebf
commit 704ff9f82e
4 changed files with 59 additions and 1 deletions

View file

@ -120,6 +120,11 @@ void addDiveSite(const QString &name)
execute(new AddDiveSite(name));
}
void importDiveSites(struct dive_site_table *sites, const QString &source)
{
execute(new ImportDiveSites(sites, source));
}
void mergeDiveSites(dive_site *ds, const QVector<dive_site *> &sites)
{
execute(new MergeDiveSites(ds, sites));