diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-29 03:15:02 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-07-29 06:43:35 (GMT) |
commit | 0eccc0f9ee9579883a829c373cfc1c072704bca0 (patch) | |
tree | db7ebfc5b35077d4f1d5851ed116e33795f7933b /src/gui/graphicsview/qgraphicsscene.cpp | |
parent | 1cff081464744774d9d3e76704c03209fca280c2 (diff) | |
download | Qt-0eccc0f9ee9579883a829c373cfc1c072704bca0.zip Qt-0eccc0f9ee9579883a829c373cfc1c072704bca0.tar.gz Qt-0eccc0f9ee9579883a829c373cfc1c072704bca0.tar.bz2 |
Make it possible to disable graphics effects.
Adds QGraphicsEffect::setEnabled/isEnabled
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 99aa347..9ce02a2 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -4303,7 +4303,7 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter * if (itemHasChildren && itemClipsChildrenToShape) ENSURE_TRANSFORM_PTR; - if (item->d_ptr->graphicsEffect) { + if (item->d_ptr->graphicsEffect && item->d_ptr->graphicsEffect->isEnabled()) { if (item->type() == 7) { item->d_ptr->graphicsEffect->setSourcePixmap(static_cast<QGraphicsPixmapItem*>(item) ->pixmap()); @@ -4484,7 +4484,7 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b QGraphicsItem *p = item->d_ptr->parent; while (p) { p->d_ptr->dirtyChildren = 1; - if (p->d_ptr->graphicsEffect) { + if (p->d_ptr->graphicsEffect && p->d_ptr->graphicsEffect->isEnabled()) { p->d_ptr->dirty = 1; p->d_ptr->fullUpdatePending = 1; } |