Skip to content

Commit 84d9e02

Browse files
committed
Fix magnification for profile export
When printing, we magnify the size of the profile by a factor of 4. This commit makes sure this magnification factor is not applied a second time when the sizes of the y axes are calculated. Signed-off-by: Robert C. Helling <helling@atdotde.de>
1 parent 308bb8f commit 84d9e02

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

backend-shared/exportfuncs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void exportProfile(QString filename, bool selected_only, ExportCallback &cb, boo
105105
cb.setProgress(done++ * 1000 / todo);
106106
QString fn = count ? fi.path() + QDir::separator() + fi.completeBaseName().append(QString("-%1.").arg(count)) + fi.suffix()
107107
: filename;
108-
exportProfile(*profile, *dive, fn, diveinfo);
108+
exportProfile(*profile, *dive, fn, diveinfo);
109109
++count;
110110
}
111111
}
@@ -170,7 +170,7 @@ void export_TeX(const char *filename, bool selected_only, bool plain, ExportCall
170170
if (selected_only && !dive->selected)
171171
continue;
172172
cb.setProgress(done++ * 1000 / todo);
173-
exportProfile(*profile, *dive, texdir.filePath(QString("profile%1.png").arg(dive->number)), false);
173+
exportProfile(*profile, *dive, texdir.filePath(QString("profile%1.png").arg(dive->number)), false);
174174
struct tm tm;
175175
utc_mkdate(dive->when, &tm);
176176

profile-widget/profilescene.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ void ProfileScene::updateAxes(bool diveHasHeartBeat, bool simplified)
385385
l.axis->setVisible(l.visible);
386386
if (!l.visible)
387387
continue;
388-
bottomBorder -= l.height * dpr;
389-
l.axis->setPosition(QRectF(leftBorder, bottomBorder, width, (l.height - l.bottom_border) * dpr));
388+
bottomBorder -= l.height;
389+
l.axis->setPosition(QRectF(leftBorder, bottomBorder, width, (l.height - l.bottom_border)));
390390
}
391391

392392
height = bottomBorder - topBorder;

0 commit comments

Comments
 (0)