QmlDesigner: Fix ChooseMaterialProperty dialog

This dialog is a standalone QQuickView with its own engine, so we
shouldn't use MaterialBrowserBackend as it is not defined.

Change-Id: Ibcca023d3f85f652f080c1eee70bac550181ef9a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2023-03-09 16:57:13 +02:00
parent 419b7faf06
commit d9e8228c4a

View File

@@ -67,7 +67,7 @@ Rectangle {
onClicked: { onClicked: {
materialsListView.currentIndex = index materialsListView.currentIndex = index
MaterialBrowserBackend.rootView.updatePropsModel(id()) rootView.updatePropsModel(id())
} }
} }
} }
@@ -134,7 +134,7 @@ Rectangle {
text: qsTr("Cancel") text: qsTr("Cancel")
onClicked: { onClicked: {
MaterialBrowserBackend.rootView.closeChooseMatPropsView() rootView.closeChooseMatPropsView()
} }
} }
@@ -145,7 +145,7 @@ Rectangle {
let matId = materialsListView.currentItem.id() let matId = materialsListView.currentItem.id()
let prop = propertiesListView.currentItem.propName() let prop = propertiesListView.currentItem.propName()
MaterialBrowserBackend.rootView.applyTextureToProperty(matId, prop) rootView.applyTextureToProperty(matId, prop)
} }
} }
} }