diff options
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r-- | profile-widget/profilewidget2.cpp | 4 |
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); |