If project is moved on disk, execute initAfterRead() to propagate project file name changes to underlying objects

p4#: 21159
This commit is contained in:
Magne Sjaastad
2013-04-08 08:36:34 +02:00
parent e89b88e47e
commit b9ed45af2c
3 changed files with 68 additions and 50 deletions

View File

@@ -235,7 +235,13 @@ bool RiaApplication::loadProject(const QString& projectFileName)
m_project->fileName = projectFileName;
m_project->readFile();
m_project->fileName = projectFileName; // Make sure we overwrite the old filename read from the project file
// If the project filename has changed, call initAfterRead once more to propagate new location of project
if (m_project->fileName() != projectFileName)
{
m_project->fileName = projectFileName;
caf::PdmDocument::initAfterReadTraversal(m_project);
}
// On error, delete everything, and bail out.