Commit f3918c74 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

ProjectManager: Restore the ProjectDir variable when loading a project.

parent 5139a1e9
......@@ -94,7 +94,6 @@ void ProjectManager::loadWorkflow()
MainWorkflow::getInstance()->loadProject( root );
loadTimeline( root );
SettingsManager::getInstance()->load( root );
if ( m_projectFile != NULL )
{
appendToRecentProject( m_projectFile->fileName() );
......@@ -139,6 +138,12 @@ void ProjectManager::loadProject( const QString& fileName )
QDomElement root = m_domDocument->documentElement();
//Load settings first, as it contains some informations about the workspace.
SettingsManager::getInstance()->load( root );
QString workspacePath = VLMC_GET_STRING("general/VLMCWorkspace");
QString projectName = VLMC_PROJECT_GET_STRING("general/ProjectName");
QString projectPath = workspacePath + '/' + projectName.replace( " ", "_" );
SettingsManager::getInstance()->setValue( "general/ProjectDir", projectPath, SettingsManager::Project );
Library::getInstance()->loadProject( root );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment