aboutsummaryrefslogtreecommitdiffstats
path: root/core/divelist.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-05-26 18:32:52 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-09-29 16:13:03 -0700
commit937fdb500b94244b2da0d72776d939e78a56fa33 (patch)
tree6faeafc717b9c9050185280cd76e5c1ec590382a /core/divelist.c
parent634e26cbcea064d6ef3d7550dacf54196547bedb (diff)
downloadsubsurface-937fdb500b94244b2da0d72776d939e78a56fa33.tar.gz
filter: add primitive filter presets
Add a rudimentary list of filter presets to the core. The list is sorted by name. Access is provided via a C interface so that the presets can be written to the git and XML logs. Internally, the list is realized by a C++ vector for convenience (euphemism for laziness). Morover, a C++ interface is provided for the UI. Currently names of the presets cannot be edited, since this would mean that the order of the list changes. This may be implemented later if required. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/divelist.c')
-rw-r--r--core/divelist.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/divelist.c b/core/divelist.c
index a5eaffe06..b1e670e31 100644
--- a/core/divelist.c
+++ b/core/divelist.c
@@ -7,6 +7,7 @@
#include "device.h"
#include "divesite.h"
#include "dive.h"
+#include "filterpreset.h"
#include "fulltext.h"
#include "planner.h"
#include "qthelper.h"
@@ -1376,6 +1377,7 @@ void clear_dive_file_data()
clear_dive(&displayed_dive);
clear_device_nodes();
clear_events();
+ clear_filter_presets();
reset_min_datafile_version();
clear_git_id();