forked from qt-creator/qt-creator
TreeModel: Inform view about changed root
This removes the need to emit the respective signal by the caller of setRootItem() if the tree has been constructed before using setRootItem(). Change-Id: I6f6210a9ef7d9ec3d347dc7cfdaf853535ca7656 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -967,6 +967,7 @@ void TreeModel::setRootItem(TreeItem *item)
|
||||
delete m_root;
|
||||
m_root = item;
|
||||
item->setModel(this);
|
||||
emit layoutChanged();
|
||||
}
|
||||
|
||||
void TreeModel::setHeader(const QStringList &displays)
|
||||
|
Reference in New Issue
Block a user