summaryrefslogtreecommitdiffstats
path: root/core/selection.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-12-06 09:47:59 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-07 10:23:44 -0800
commitf4f9ba9263c97a7c7612b68711a6c92c70d8721a (patch)
tree75d98986df501597c16e3b44117518190cb06862 /core/selection.h
parent84394adb11736de0fa37f7dfb7cf426fcd8f26f5 (diff)
downloadsubsurface-f4f9ba9263c97a7c7612b68711a6c92c70d8721a.tar.gz
Selection: provide convenience function for single-dive selection
Currently, selecting a single dive or deselecting all dives was quite awkward: One had to pass in a single-dive vector and the dive itself (as current dive). Provide a convenience function that selects a single dive or deselects all dives if null is passed in. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/selection.h')
-rw-r--r--core/selection.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/selection.h b/core/selection.h
index a390f0dd7..8fe5707ce 100644
--- a/core/selection.h
+++ b/core/selection.h
@@ -20,6 +20,7 @@ extern struct dive *first_selected_dive(void);
extern struct dive *last_selected_dive(void);
extern bool consecutive_selected(void);
extern void select_newest_visible_dive();
+extern void select_single_dive(struct dive *d); // wrapper for setSelection() with a single dive. NULL clears the selection.
#if DEBUG_SELECTION_TRACKING
extern void dump_selection(void);