Skip to content

Commit

Permalink
QPdfWriter - Fix setting of margins
Browse files Browse the repository at this point in the history
The setting of margins wasn't being passed to the base class, so calling
margins() wouldn't return the new values.

Change-Id: I86c30f28fb0430f4b9d6e180a59cad354b489289
Reviewed-by: Gunnar Sletta <[email protected]>
  • Loading branch information
jlayt authored and The Qt Project committed Jan 9, 2014
1 parent c07c9bc commit d76f05e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gui/painting/qpdfwriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ void QPdfWriter::setMargins(const Margins &m)
{
Q_D(QPdfWriter);

QPagedPaintDevice::setMargins(m);

const qreal multiplier = 72./25.4;
d->engine->d_func()->leftMargin = m.left*multiplier;
d->engine->d_func()->rightMargin = m.right*multiplier;
Expand Down

0 comments on commit d76f05e

Please sign in to comment.