filter: implement importing of filter presets

When importing a divelog, import filter presets. If there are
equal names, import only if the presets differ. In that case,
disambiguate the name. This made things a bit more complicated,
as comparison of filter presets had to be implemented.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-06-28 15:24:19 +02:00 committed by Dirk Hohndel
parent 631be569fe
commit f9721fce4b
14 changed files with 81 additions and 13 deletions

View file

@ -194,7 +194,7 @@ void DiveImportedModel::recordDives(int flags)
std::pair<struct dive_table, struct dive_site_table> tables = consumeTables();
if (tables.first.nr > 0) {
auto data = thread.data();
Command::importDives(&tables.first, nullptr, &tables.second, flags, data->devName());
Command::importDives(&tables.first, nullptr, &tables.second, nullptr, flags, data->devName());
} else {
clear_dive_site_table(&tables.second);
}