QmlDesigner: Fix imported meshes don't appear in a model's source

Fixes: QDS-6329
Change-Id: Iec70492d8dfce4f8a0ce05cbd16991f70b9eb985
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Mahmoud Badri
2022-02-24 13:56:26 +02:00
parent 0ce098ed87
commit c077f42e23

View File

@@ -64,7 +64,7 @@ void FileResourcesModel::setModelNodeBackend(const QVariant &modelNodeBackend)
if (backendObjectCasted) {
QmlDesigner::Model *model = backendObjectCasted->qmlObjectNode().modelNode().model();
m_docPath = QDir{QFileInfo{model->fileUrl().toLocalFile()}.absolutePath()};
m_path = QUrl::fromLocalFile(QmlDesigner::DocumentManager::currentResourcePath()
m_path = QUrl::fromLocalFile(QmlDesigner::DocumentManager::currentProjectDirPath()
.toFileInfo().absoluteFilePath());
}