diff options
author | Gehad elrobey <gehadelrobey@gmail.com> | 2015-08-03 22:55:46 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2015-08-15 15:02:10 +0300 |
commit | 88c19adc7880d21aed4fa0e498d0291c5fd9f9d4 (patch) | |
tree | 736d029a0a17d86150b1c2faa5ce4f589189e13f /qt-ui | |
parent | 8d0101bf3d94d393615f19396bc2ff2d930f531c (diff) | |
download | subsurface-88c19adc7880d21aed4fa0e498d0291c5fd9f9d4.tar.gz |
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 <neolit123@gmail.com>
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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); |