mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
032ea24191
commit
dbb86374e0
3 changed files with 24 additions and 17 deletions
18
divelist.c
18
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue