From 9f176a9953e42ae08aaed5fa92ed55bbc8526142 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 22 Jul 2009 16:26:28 +0200 Subject: Fix table borders in multiline tables when printing to PostScript. I'm not all to happy with this fix, but its the best that one can acheive given the current design. The problem is that QPdfBaseEngine sets a number of states as part of updateState(), but only when we are playing back through the alpha engine. These states are used in some draw functions, also when we are recording in the alpha engine. This leads to the states and their checks being out of sync. So to follow the existing pattern in the code we need to not touch d-> vars prior to a check to usesAlphaEngine. Reviewed-By: Eskil --- src/gui/painting/qpdf.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index 2017fdd..8a991e3 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -964,8 +964,7 @@ QPdfBaseEngine::QPdfBaseEngine(QPdfBaseEnginePrivate &dd, PaintEngineFeatures f) void QPdfBaseEngine::drawPoints (const QPointF *points, int pointCount) { - Q_D(QPdfBaseEngine); - if (!points || !d->hasPen) + if (!points) return; QPainterPath p; @@ -995,6 +994,12 @@ void QPdfBaseEngine::drawRects (const QRectF *rects, int rectCount) return; Q_D(QPdfBaseEngine); + if (d->useAlphaEngine) { + QAlphaPaintEngine::drawRects(rects, rectCount); + if (!continueCall()) + return; + } + if (d->clipEnabled && d->allClipped) return; if (!d->hasPen && !d->hasBrush) -- cgit v0.12