ProjectExplorer: Don't update flat model on projectAdd

We get called back soon enough when projects are parsed.

Also, mark the container node for initial expansion  not
the project's root which typically does not exist yet.

Change-Id: I49100f83f8c57d5ef80d0f6f369330b646707260
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
hjk
2017-03-24 13:39:18 +01:00
parent 9c18e718a7
commit 5ac136204e

View File

@@ -240,12 +240,6 @@ void FlatModel::handleProjectAdded(Project *project)
{
Node *node = project->containerNode();
m_toExpand.insert(expandDataForNode(node));
if (WrapperNode *wrapper = wrapperForNode(node)) {
wrapper->forFirstLevelChildren([this](WrapperNode *child) {
m_toExpand.insert(expandDataForNode(child->m_node));
});
}
update();
}
void FlatModel::loadExpandData()