diff options
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultimagenode.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultimagenode.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/quick/scenegraph/qsgdefaultimagenode.cpp b/src/quick/scenegraph/qsgdefaultimagenode.cpp index 349a92ac7f..11d0e5dbeb 100644 --- a/src/quick/scenegraph/qsgdefaultimagenode.cpp +++ b/src/quick/scenegraph/qsgdefaultimagenode.cpp @@ -298,15 +298,13 @@ void QSGDefaultImageNode::setHorizontalWrapMode(QSGTexture::WrapMode wrapMode) void QSGDefaultImageNode::setTexture(QSGTexture *texture) { - if (texture == m_material.texture()) - return; + Q_ASSERT(texture); m_material.setTexture(texture); m_materialO.setTexture(texture); m_smoothMaterial.setTexture(texture); - // Texture cleanup - if (texture) - m_material.setFlag(QSGMaterial::Blending, texture->hasAlphaChannel()); + m_material.setFlag(QSGMaterial::Blending, texture->hasAlphaChannel()); + markDirty(DirtyMaterial); // Because the texture can be a different part of the atlas, we need to update it... |