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>
This commit is contained in:
parent
8d0101bf3d
commit
88c19adc78
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user