Fix plaintext printing >2 pages

This commit is contained in:
Anton Thomasson 2022-04-09 13:30:41 +02:00
parent 5799985c92
commit 6e2ded84e2

View file

@ -454,6 +454,7 @@ try {
while(true) while(true)
{ {
painter.save();
painter.translate(body.left(), body.top() - p*body.height()); painter.translate(body.left(), body.top() - p*body.height());
QRectF view(0, p*body.height(), body.width(), body.height()); QRectF view(0, p*body.height(), body.width(), body.height());
painter.setClipRect(view); painter.setClipRect(view);
@ -462,6 +463,7 @@ try {
context.clip = view; context.clip = view;
context.palette.setColor(QPalette::Text, Qt::black); context.palette.setColor(QPalette::Text, Qt::black);
doc.documentLayout()->draw(&painter, context); doc.documentLayout()->draw(&painter, context);
painter.restore();
p++; p++;
pageCount++; pageCount++;