mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Use get_cylinder_index instead of get_gasidx
Replace get_gasmix_from_event and get_gasidx with get_cylinder_index. get_cylinder_index actually knows about both types of gaschange events and the difference between them. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b4679c819f
commit
6f8dc22e08
1 changed files with 1 additions and 2 deletions
|
@ -128,9 +128,8 @@ bool DiveEventItem::shouldBeHidden()
|
|||
* Don't bother showing them if they match the first gas already
|
||||
*/
|
||||
if (!strcmp(event->name, "gaschange") && !event->time.seconds) {
|
||||
struct gasmix *mix = get_gasmix_from_event(event);
|
||||
struct dive *dive = current_dive;
|
||||
if (dive && get_gasidx(dive, mix) <= 0)
|
||||
if (dive && get_cylinder_index(dive, event) == 0)
|
||||
return true;
|
||||
}
|
||||
for (int i = 0; i < evn_used; i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue