aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/items
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-11-14 16:14:22 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-14 16:39:25 +0100
commit077c7eb97c822e70fdb2bfe88e3ddec46897ef6e (patch)
treeb9fcc8a13a77cc814014befd9f22b153e108c643 /src/declarative/items
parentfff130ee6c4b4a06d0f90fa8ed8c3a6c4218035f (diff)
Make shader effects visible even if source is initially empty
Task-number: QTBUG-21343 Change-Id: Iaa34d74d2458f0a9dc94c96ee13d3406e1d8f1cb Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Diffstat (limited to 'src/declarative/items')
-rw-r--r--src/declarative/items/qquickshadereffectsource.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/declarative/items/qquickshadereffectsource.cpp b/src/declarative/items/qquickshadereffectsource.cpp
index 351ea34bbc..252c0ba4f3 100644
--- a/src/declarative/items/qquickshadereffectsource.cpp
+++ b/src/declarative/items/qquickshadereffectsource.cpp
@@ -582,8 +582,11 @@ void QQuickShaderEffectSource::setSourceItem(QQuickItem *item)
{
if (item == m_sourceItem)
return;
- if (m_sourceItem)
+ if (m_sourceItem) {
QQuickItemPrivate::get(m_sourceItem)->derefFromEffectItem(m_hideSource);
+ disconnect(m_sourceItem, SIGNAL(widthChanged()), this, SLOT(update()));
+ disconnect(m_sourceItem, SIGNAL(heightChanged()), this, SLOT(update()));
+ }
m_sourceItem = item;
if (m_sourceItem) {
// TODO: Find better solution.
@@ -595,6 +598,8 @@ void QQuickShaderEffectSource::setSourceItem(QQuickItem *item)
m_sourceItem->setVisible(false);
}
QQuickItemPrivate::get(m_sourceItem)->refFromEffectItem(m_hideSource);
+ connect(m_sourceItem, SIGNAL(widthChanged()), this, SLOT(update()));
+ connect(m_sourceItem, SIGNAL(heightChanged()), this, SLOT(update()));
}
update();
emit sourceItemChanged();