diff options
author | jan Iversen <jani@libreoffice.org> | 2018-05-22 10:49:29 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-05-24 12:04:14 -0700 |
commit | 86ab5a91f7d3b450e686c5a2cf8db8e4a8ff842e (patch) | |
tree | cb4989fdcb15e54d4e565c728a49c6bfabfd841a /profile-widget/profilewidget2.cpp | |
parent | a658f80e270c7ab3ed7f1fa02a1f1e142a3b1639 (diff) | |
download | subsurface-86ab5a91f7d3b450e686c5a2cf8db8e4a8ff842e.tar.gz |
profile-widget: set printmode but allow events for ssrf-mobile
Reactivate printMode true for ssrf-mobile to avoid font problems,
do not discard events if ssrf-mobile (even though printMode is true)
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r-- | profile-widget/profilewidget2.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index ad15b9162..4909f5dbe 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -738,7 +738,9 @@ void ProfileWidget2::plotDive(struct dive *d, bool force, bool doClearPictures) struct event *event = currentdc->events; struct event *ev; struct gasmix lastgasmix = *get_gasmix(&displayed_dive, current_dc, 1, &ev, NULL); + while (event) { +#ifndef SUBSURFACE_MOBILE // if print mode is selected only draw headings, SP change, gas events or bookmark event if (printMode) { if (empty_string(event->name) || @@ -750,6 +752,10 @@ void ProfileWidget2::plotDive(struct dive *d, bool force, bool doClearPictures) continue; } } +#else + // printMode is always selected for SUBSURFACE_MOBILE due to font problems + // BUT events are wanted. +#endif DiveEventItem *item = new DiveEventItem(); item->setHorizontalAxis(timeAxis); item->setVerticalAxis(profileYAxis); @@ -760,6 +766,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force, bool doClearPictures) eventItems.push_back(item); event = event->next; } + // Only set visible the events that should be visible Q_FOREACH (DiveEventItem *event, eventItems) { event->setVisible(!event->shouldBeHidden()); |