diff --git a/src/printsupport/kernel/qpaintengine_alpha.cpp b/src/printsupport/kernel/qpaintengine_alpha.cpp index ddfa918b90..6d292a6a71 100644 --- a/src/printsupport/kernel/qpaintengine_alpha.cpp +++ b/src/printsupport/kernel/qpaintengine_alpha.cpp @@ -346,7 +346,10 @@ void QAlphaPaintEngine::flushAndInit(bool init) d->m_picpainter->setOpacity(painter()->opacity()); d->m_picpainter->setTransform(painter()->combinedTransform()); d->m_picengine->syncState(); - *d->m_picpainter->d_func()->state = *painter()->d_func()->state; + QPainterState &state = *d->m_picpainter->d_func()->state; + QPainter *oldPainter = state.painter; + state = *painter()->d_func()->state; + state.painter = oldPainter; } }