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>
This commit is contained in:
Robert C. Helling 2018-01-20 17:58:52 +01:00
parent c866b82f35
commit 7b508e41cd
3 changed files with 12 additions and 6 deletions

View file

@ -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);