QmlDesigner: Update texture editor and browser after source reset

Fixes: QDS-8520
Change-Id: I9ceca64d75ef1c41633a89a79748265beecd16ea
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Ali Kianian <ali.kianian@qt.io>
This commit is contained in:
Mahmoud Badri
2022-12-07 23:16:50 +02:00
parent b530f938ba
commit e70f909bcf
3 changed files with 16 additions and 1 deletions

View File

@@ -555,7 +555,13 @@ void TextureEditorView::propertiesRemoved(const QList<AbstractProperty> &propert
m_qmlBackEnd->contextObject()->setHasAliasExport(QmlObjectNode(m_selectedTexture).isAliasExported());
if (node == m_selectedTexture || QmlObjectNode(m_selectedTexture).propertyChangeForCurrentState() == node) {
setValue(m_selectedTexture, property.name(), QmlObjectNode(m_selectedTexture).instanceValue(property.name()));
// TODO: workaround for bug QDS-8539. To be removed once it is fixed.
if (node.metaInfo().property(property.name()).propertyType().isUrl()) {
resetPuppet();
} else {
setValue(m_selectedTexture, property.name(),
QmlObjectNode(m_selectedTexture).instanceValue(property.name()));
}
}
if (property.name() == "materials" && (node == m_selectedModel