summaryrefslogtreecommitdiffstats
path: root/profile-widget/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2018-01-20 17:58:52 +0100
committerGravatar Robert C. Helling <helling@atdotde.de>2018-01-21 15:24:46 +0100
commit7b508e41cd1304834511f87dbe399398517aaeff (patch)
treeae6ca6ae95990b3f5d64c33b5a509d4dd432917c /profile-widget/profilewidget2.cpp
parentc866b82f35365136d52d3113517aa6d5627eded3 (diff)
downloadsubsurface-7b508e41cd1304834511f87dbe399398517aaeff.tar.gz
Show ICD events data in infobox
If a gas switch violates our ICD criteria, show this in the info box. Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r--profile-widget/profilewidget2.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 1f382ebb4..85b6b1c78 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -715,6 +715,8 @@ void ProfileWidget2::plotDive(struct dive *d, bool force)
qDeleteAll(eventItems);
eventItems.clear();
struct event *event = currentdc->events;
+ struct event *ev;
+ struct gasmix lastgasmix = *get_gasmix(&displayed_dive, current_dc, 1, &ev, NULL);
while (event) {
// if print mode is selected only draw headings, SP change, gas events or bookmark event
if (printMode) {
@@ -731,7 +733,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force)
item->setHorizontalAxis(timeAxis);
item->setVerticalAxis(profileYAxis);
item->setModel(dataModel);
- item->setEvent(event);
+ item->setEvent(event, &lastgasmix);
item->setZValue(2);
scene()->addItem(item);
eventItems.push_back(item);