From 88c19adc7880d21aed4fa0e498d0291c5fd9f9d4 Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Mon, 3 Aug 2015 22:55:46 +0200 Subject: Printing: hide warnings in dive profile while printing While printing only draw headings, SP changes, gas events or bookmark events, otherwise don't show anything. Many warning logos can hide the useful information especially in templates with small dive profile area. Signed-off-by: Lubomir I. Ivanov Signed-off-by: Gehad elrobey --- qt-ui/profile/profilewidget2.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 400401655..c776f9fea 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -627,6 +627,17 @@ void ProfileWidget2::plotDive(struct dive *d, bool force) eventItems.clear(); struct event *event = currentdc->events; while (event) { + // if print mode is selected only draw headings, SP change, gas events or bookmark event + if (printMode) { + if (same_string(event->name, "") || + !(strcmp(event->name, "heading") == 0 || + (same_string(event->name, "SP change") && event->time.seconds == 0) || + event_is_gaschange(event) || + event->type == SAMPLE_EVENT_BOOKMARK)) { + event = event->next; + continue; + } + } DiveEventItem *item = new DiveEventItem(); item->setHorizontalAxis(timeAxis); item->setVerticalAxis(profileYAxis); -- cgit v1.2.3-70-g09d2