Avoid double-highdpi scaling for attached painters.

updateMatrix will us both redirection matrix and highdpi
scale matrix, so make sure we don't multiply it in twice.

Change-Id: I7394e504746a8de54b4dc79492264deba320538f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
Gunnar Sletta 2013-05-27 13:56:59 +02:00 committed by The Qt Project
parent 130ee40b5e
commit 991b817e75

View File

@ -293,6 +293,7 @@ bool QPainterPrivate::attachPainterPrivate(QPainter *q, QPaintDevice *pdev)
// Update matrix.
if (q->d_ptr->state->WxF) {
q->d_ptr->state->redirectionMatrix = q->d_ptr->state->matrix;
q->d_ptr->state->redirectionMatrix *= q->d_ptr->hidpiScaleTransform().inverted();
q->d_ptr->state->redirectionMatrix.translate(-offset.x(), -offset.y());
q->d_ptr->state->worldMatrix = QTransform();
q->d_ptr->state->WxF = false;