diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-03-11 12:31:00 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-03-11 12:31:00 -0700 |
commit | e9e9996766a47044249cbcb7ff7185fb04ac9882 (patch) | |
tree | 558c11cb95c00ee1346a79b40585000bb4b1b620 /qt-ui/profile | |
parent | 0739da38c59e966855c28a26ea252316149f796b (diff) | |
download | subsurface-e9e9996766a47044249cbcb7ff7185fb04ac9882.tar.gz |
Better testing if the first gas is explicit
Given that we might be adding a gas change event at t = 0 we need to check
for both that and t = time_or_first_sample.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r-- | qt-ui/profile/diveeventitem.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-ui/profile/diveeventitem.cpp b/qt-ui/profile/diveeventitem.cpp index 700430007..0d81e7b45 100644 --- a/qt-ui/profile/diveeventitem.cpp +++ b/qt-ui/profile/diveeventitem.cpp @@ -135,7 +135,9 @@ bool DiveEventItem::shouldBeHidden() * Don't bother showing those */ struct sample *first_sample = &get_dive_dc(&displayed_dive, dc_number)->sample[0]; - if (!strcmp(event->name, "gaschange") && first_sample && event->time.seconds == first_sample->time.seconds) + if (!strcmp(event->name, "gaschange") && + (event->time.seconds == 0 || + (first_sample && event->time.seconds == first_sample->time.seconds))) return true; for (int i = 0; i < evn_used; i++) { |