QmlDesigner: Reset item library drag on model detach

Fixes: QDS-7823
Change-Id: If0b758f79dd4a55356d2cd5aefe65fa3e6e321be
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2022-10-10 17:41:40 +03:00
parent b8f4cd97d1
commit 007a9a46a5

View File

@@ -295,8 +295,10 @@ void ItemLibraryWidget::delayedUpdateModel()
void ItemLibraryWidget::setModel(Model *model)
{
m_model = model;
if (!model)
if (!model) {
m_itemToDrag = {};
return;
}
setItemLibraryInfo(model->metaInfo().itemLibraryInfo());