Make all projects generate a fresh project tree

Do not update the existing project tree anymore: Start a fresh one
and throw the old one away.

Change-Id: Ifabe293b6ca668b0672516a6d81acd5346d98fe5
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2017-03-03 15:13:06 +01:00
parent 71a5aee36f
commit 2fde3fffa9
14 changed files with 44 additions and 38 deletions

View File

@@ -157,8 +157,10 @@ void NimProject::updateProject()
if (oldFiles == m_files)
return;
rootProjectNode()->makeEmpty();
rootProjectNode()->buildTree(fileNodes);
auto newRoot = new NimProjectNode(*this, projectDirectory());
newRoot->setDisplayName(displayName());
newRoot->buildTree(fileNodes);
setRootProjectNode(newRoot);
emit fileListChanged();