aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp')
-rw-r--r--src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp b/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp
index 28c17d7561..ca76d45966 100644
--- a/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp
+++ b/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp
@@ -767,11 +767,16 @@ void MaterialEditorView::customNotification(const AbstractView *view, const QStr
void QmlDesigner::MaterialEditorView::highlightSupportedProperties(bool highlight)
{
+ if (!m_selectedMaterial.isValid())
+ return;
+
DesignerPropertyMap &propMap = m_qmlBackEnd->backendValuesPropertyMap();
const QStringList propNames = propMap.keys();
+ NodeMetaInfo metaInfo = m_selectedMaterial.metaInfo();
+ QTC_ASSERT(metaInfo.isValid(), return);
for (const QString &propName : propNames) {
- if (propName.endsWith("Map")) {
+ if (metaInfo.propertyTypeName(propName.toLatin1()) == "QtQuick3D.Texture") {
QObject *propEditorValObj = propMap.value(propName).value<QObject *>();
PropertyEditorValue *propEditorVal = qobject_cast<PropertyEditorValue *>(propEditorValObj);
propEditorVal->setHasActiveDrag(highlight);