summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2019-10-14 11:20:00 +0200
committerPaul Lemire <paul.lemire@kdab.com>2019-10-16 07:08:46 +0200
commit8bf52f35d116f4170b76d04c7e2b86c4bbc78a8d (patch)
treef7772d5f77f8f4c0797c855ff70436eb1f37ad6c
parent3c9a56d4e6ce94f0f6131574362fa1e43d9f85ff (diff)
QTextureLoader: reset target and format on source change
Could otherwise prevent reloading the content of the texture when the generator/source changes Change-Id: I5cf3389792032ba7a85a111f04dd4670a3091683 Reviewed-by: Mike Krus <mike.krus@kdab.com>
-rw-r--r--src/render/texture/qtexture.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/render/texture/qtexture.cpp b/src/render/texture/qtexture.cpp
index 734942847..b28004aa0 100644
--- a/src/render/texture/qtexture.cpp
+++ b/src/render/texture/qtexture.cpp
@@ -1483,6 +1483,11 @@ void QTextureLoader::setSource(const QUrl& source)
Q_D(QTextureLoader);
if (source != d->m_source) {
d->m_source = source;
+
+ // Reset target and format
+ d->m_target = TargetAutomatic;
+ setFormat(NoFormat);
+
d->updateGenerator();
const bool blocked = blockNotifications(true);
emit sourceChanged(source);