forked from qt-creator/qt-creator
QmlDesigner: End drag when dragging an asset to a material
Fixes: QDS-9474 Change-Id: Iaed7c6a3a2308e895f7d945abc3aaa49eacfc98a Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -296,6 +296,9 @@ void MaterialBrowserWidget::acceptBundleTextureDropOnMaterial(int matIndex, cons
|
|||||||
m_materialBrowserView->applyTextureToMaterial({mat}, tex);
|
m_materialBrowserView->applyTextureToMaterial({mat}, tex);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (m_materialBrowserView->model())
|
||||||
|
m_materialBrowserView->model()->endDrag();
|
||||||
|
|
||||||
creator->deleteLater();
|
creator->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -326,6 +329,9 @@ void MaterialBrowserWidget::acceptAssetsDropOnMaterial(int matIndex, const QList
|
|||||||
m_materialBrowserView->applyTextureToMaterial({mat}, tex);
|
m_materialBrowserView->applyTextureToMaterial({mat}, tex);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (m_materialBrowserView->model())
|
||||||
|
m_materialBrowserView->model()->endDrag();
|
||||||
|
|
||||||
creator->deleteLater();
|
creator->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user