mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: remove autogroup global
Use the flag in the divelog structure, since this will be saved in the dive log. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
aa34afc3f7
commit
b61732da42
10 changed files with 23 additions and 29 deletions
|
@ -22,15 +22,6 @@
|
|||
#include "table.h"
|
||||
#include "trip.h"
|
||||
|
||||
bool autogroup = false;
|
||||
|
||||
void set_autogroup(bool value)
|
||||
{
|
||||
/* if we keep the UI paradigm, this needs to toggle
|
||||
* the checkbox on the autogroup menu item */
|
||||
autogroup = value;
|
||||
}
|
||||
|
||||
/*
|
||||
* Get "maximal" dive gas for a dive.
|
||||
* Rules:
|
||||
|
@ -724,7 +715,7 @@ static void autogroup_dives(struct dive_table *table, struct trip_table *trip_ta
|
|||
int i, j;
|
||||
bool alloc;
|
||||
|
||||
if (!autogroup)
|
||||
if (!divelog.autogroup)
|
||||
return;
|
||||
|
||||
for (i = 0; (trip = get_dives_to_autogroup(table, i, &from, &to, &alloc)) != NULL; i = to) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue