summaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-24 13:19:05 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-24 13:19:05 -0700
commitdbb86374e00df9e06c4d96c436e3c3a998cc1ae9 (patch)
treea0895c7856570ef2764c7a0c6d18b420d9197201 /divelist.c
parent032ea241916549801cd656593821d43bb8fd9f55 (diff)
downloadsubsurface-dbb86374e00df9e06c4d96c436e3c3a998cc1ae9.tar.gz
Dive list: move trip selection / deselection logic to divelist.c
This is core logic, not UI code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
-rw-r--r--divelist.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/divelist.c b/divelist.c
index a3207b02c..e600a6cd2 100644
--- a/divelist.c
+++ b/divelist.c
@@ -846,6 +846,24 @@ void deselect_dive(int idx)
}
}
+void deselect_dives_in_trip(struct dive_trip *trip)
+{
+ struct dive *dive;
+ if (!trip)
+ return;
+ for (dive = trip->dives; dive; dive = dive->next)
+ deselect_dive(get_divenr(dive));
+}
+
+void select_dives_in_trip(struct dive_trip *trip)
+{
+ struct dive *dive;
+ if (!trip)
+ return;
+ for (dive = trip->dives; dive; dive = dive->next)
+ select_dive(get_divenr(dive));
+}
+
void mark_divelist_changed(int changed)
{
dive_list_changed = changed;