diff --git a/src/plugins/qmldesigner/components/textureeditor/textureeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/textureeditor/textureeditorqmlbackend.cpp index 530dd6b9d69..af56832ea38 100644 --- a/src/plugins/qmldesigner/components/textureeditor/textureeditorqmlbackend.cpp +++ b/src/plugins/qmldesigner/components/textureeditor/textureeditorqmlbackend.cpp @@ -284,4 +284,9 @@ void TextureEditorQmlBackend::setValueforAuxiliaryProperties(const QmlObjectNode setValue(qmlObjectNode, propertyName, qmlObjectNode.modelNode().auxiliaryDataWithDefault(key)); } +void TextureEditorQmlBackend::refreshBackendModel() +{ + m_backendModelNode.refresh(); +} + } // namespace QmlDesigner diff --git a/src/plugins/qmldesigner/components/textureeditor/textureeditorqmlbackend.h b/src/plugins/qmldesigner/components/textureeditor/textureeditorqmlbackend.h index 060e9249d0e..5f80d100948 100644 --- a/src/plugins/qmldesigner/components/textureeditor/textureeditorqmlbackend.h +++ b/src/plugins/qmldesigner/components/textureeditor/textureeditorqmlbackend.h @@ -56,6 +56,7 @@ public: void emitSelectionChanged(); void setValueforAuxiliaryProperties(const QmlObjectNode &qmlObjectNode, AuxiliaryDataKeyView key); + void refreshBackendModel(); private: void createPropertyEditorValue(const QmlObjectNode &qmlObjectNode, diff --git a/src/plugins/qmldesigner/components/textureeditor/textureeditorview.cpp b/src/plugins/qmldesigner/components/textureeditor/textureeditorview.cpp index 8678e9433d1..73103df4885 100644 --- a/src/plugins/qmldesigner/components/textureeditor/textureeditorview.cpp +++ b/src/plugins/qmldesigner/components/textureeditor/textureeditorview.cpp @@ -805,6 +805,15 @@ void TextureEditorView::nodeRemoved([[maybe_unused]] const ModelNode &removedNod { if (m_selectedTextureChanged) asyncResetView(); + + m_qmlBackEnd->refreshBackendModel(); +} + +void TextureEditorView::nodeIdChanged([[maybe_unused]] const ModelNode &node, + [[maybe_unused]] const QString &newId, + [[maybe_unused]] const QString &oldId) +{ + m_qmlBackEnd->refreshBackendModel(); } bool TextureEditorView::hasWidget() const diff --git a/src/plugins/qmldesigner/components/textureeditor/textureeditorview.h b/src/plugins/qmldesigner/components/textureeditor/textureeditorview.h index a816c2d1499..eb594af33c8 100644 --- a/src/plugins/qmldesigner/components/textureeditor/textureeditorview.h +++ b/src/plugins/qmldesigner/components/textureeditor/textureeditorview.h @@ -57,7 +57,7 @@ public: void nodeRemoved(const ModelNode &removedNode, const NodeAbstractProperty &parentProperty, PropertyChangeFlags propertyChange) override; - + void nodeIdChanged(const ModelNode& node, const QString& newId, const QString& oldId) override; void resetView(); void currentStateChanged(const ModelNode &node) override; void instancePropertyChanged(const QList > &propertyList) override;