mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
filter: don't add to filter presets when importing dive sites
When importing dive-sites we would add to the global filter-preset table. This data should be thrown away, just like the other tables that might be imported. This shows that we really should introduce a "struct divelog", which collects all those tables into a single structure. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
a7bbb6c1cc
commit
ad608e48f5
1 changed files with 2 additions and 1 deletions
|
@ -1644,10 +1644,11 @@ void MainWindow::on_actionImportDiveSites_triggered()
|
|||
struct dive_table table = empty_dive_table;
|
||||
struct trip_table trips = empty_trip_table;
|
||||
struct dive_site_table sites = empty_dive_site_table;
|
||||
struct filter_preset_table filter_presets;
|
||||
|
||||
for (const QString &s: fileNames) {
|
||||
QByteArray fileNamePtr = QFile::encodeName(s);
|
||||
parse_file(fileNamePtr.data(), &table, &trips, &sites, &filter_preset_table);
|
||||
parse_file(fileNamePtr.data(), &table, &trips, &sites, &filter_presets);
|
||||
}
|
||||
// The imported dive sites still have pointers to imported dives - remove them
|
||||
for (int i = 0; i < sites.nr; ++i)
|
||||
|
|
Loading…
Add table
Reference in a new issue