Fix text being cut off at the right side in print preview.

This patch now also copies the state of the QPainter returned from
QPaintEngine::painter for the first page of a print preview, as it is
done for all other pages of a preview in QPreviewPaintEngine::newPage().

Task-number: QTBUG-30621
Change-Id: I50001231c4006b9627ff80504618cbe0fa6d9f65
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
bb10
Michael Brüning 2013-07-11 15:31:34 +02:00 committed by The Qt Project
parent 4f7727d861
commit 3693ada1a6
1 changed files with 1 additions and 0 deletions

View File

@ -94,6 +94,7 @@ bool QPreviewPaintEngine::begin(QPaintDevice *)
page->d_func()->in_memory_only = true;
d->painter = new QPainter(page);
d->engine = d->painter->paintEngine();
*d->painter->d_func()->state = *painter()->d_func()->state;
d->pages.append(page);
d->state = QPrinter::Active;
return true;