mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:23:23 +00:00
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
1 changed files with 11 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue