diff --git a/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp b/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp index d231ba1e510..29b07bb3b6d 100644 --- a/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp +++ b/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp @@ -50,7 +50,6 @@ #include #include #include -#include #include #include @@ -819,13 +818,10 @@ void MaterialEditorView::dragStarted(QMimeData *mimeData) if (!mimeData->hasFormat(Constants::MIME_TYPE_ASSETS)) return; - const QStringList assetPaths = QString::fromUtf8(mimeData->data(Constants::MIME_TYPE_ASSETS)).split(','); - bool isImage = Utils::anyOf(assetPaths, [] (const QString &assetPath) { - QString assetType = AssetsLibraryWidget::getAssetTypeAndData(assetPath).first; - return assetType == Constants::MIME_TYPE_ASSET_IMAGE; - }); + const QString assetPath = QString::fromUtf8(mimeData->data(Constants::MIME_TYPE_ASSETS)).split(',')[0]; + QString assetType = AssetsLibraryWidget::getAssetTypeAndData(assetPath).first; - if (!isImage) // only image assets are dnd supported + if (assetType != Constants::MIME_TYPE_ASSET_IMAGE) // currently only image assets have dnd-supported properties return; highlightSupportedProperties();