diff options
Diffstat (limited to 'src/gui/graphicsview/qgraphicseffect_p.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicseffect_p.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicseffect_p.h b/src/gui/graphicsview/qgraphicseffect_p.h index 6664a03..6d546cc 100644 --- a/src/gui/graphicsview/qgraphicseffect_p.h +++ b/src/gui/graphicsview/qgraphicseffect_p.h @@ -94,12 +94,16 @@ public: inline void setGraphicsEffectSource(QGraphicsEffectSource *newSource) { + QGraphicsEffect::ChangeFlags flags; if (source) { + flags |= QGraphicsEffect::SourceDetached; source->d_func()->detach(); delete source; } source = newSource; - q_func()->sourceChanged(); + if (newSource) + flags |= QGraphicsEffect::SourceAttached; + q_func()->sourceChanged(flags); } QGraphicsEffectSource *source; |