forked from qt-creator/qt-creator
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:
@@ -295,8 +295,10 @@ void ItemLibraryWidget::delayedUpdateModel()
|
|||||||
void ItemLibraryWidget::setModel(Model *model)
|
void ItemLibraryWidget::setModel(Model *model)
|
||||||
{
|
{
|
||||||
m_model = model;
|
m_model = model;
|
||||||
if (!model)
|
if (!model) {
|
||||||
|
m_itemToDrag = {};
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
setItemLibraryInfo(model->metaInfo().itemLibraryInfo());
|
setItemLibraryInfo(model->metaInfo().itemLibraryInfo());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user