forked from qt-creator/qt-creator
Utils: Fix propagation of underlying tree model
Change-Id: I23739cb4c7a19a5c5bcdc8bf39c36db689292b62 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -705,6 +705,8 @@ void TreeItem::insertChild(int pos, TreeItem *item)
|
|||||||
m_model->endInsertRows();
|
m_model->endInsertRows();
|
||||||
} else {
|
} else {
|
||||||
item->m_parent = this;
|
item->m_parent = this;
|
||||||
|
if (m_model)
|
||||||
|
item->propagateModel(m_model);
|
||||||
m_children.insert(m_children.begin() + pos, item);
|
m_children.insert(m_children.begin() + pos, item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user