From 878789d3889d540bd9daad63b84181815d4589ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Nilsen?= Date: Tue, 4 Aug 2009 15:36:56 +0200 Subject: Toggling QGraphicsEffect's enabled property does not update the source. Makes tst_QGraphicsEffect::draw happy. --- src/gui/graphicsview/qgraphicseffect.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/graphicsview/qgraphicseffect.cpp b/src/gui/graphicsview/qgraphicseffect.cpp index 43ed86a..e63af3c 100644 --- a/src/gui/graphicsview/qgraphicseffect.cpp +++ b/src/gui/graphicsview/qgraphicseffect.cpp @@ -163,7 +163,13 @@ QRectF QGraphicsEffect::boundingRectFor(const QRectF &rect) const void QGraphicsEffect::setEnabled(bool enable) { Q_D(QGraphicsEffect); + if (d->isEnabled == enable) + return; + d->isEnabled = enable; + + if (d->source) + d->source->update(); } bool QGraphicsEffect::isEnabled() const -- cgit v0.12