[vlmc-devel] commit: ProjectManager: Restore the ProjectDir variable when loading a project. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Sun Jun 20 19:58:21 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Sun Jun 20 19:58:30 2010 +0200| [f3918c747f1cf829329134a3bb224edba8fc685c] | committer: Hugo Beauzée-Luyssen
ProjectManager: Restore the ProjectDir variable when loading a project.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=f3918c747f1cf829329134a3bb224edba8fc685c
---
src/Project/ProjectManager.cpp | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/Project/ProjectManager.cpp b/src/Project/ProjectManager.cpp
index a87833f..987323c 100644
--- a/src/Project/ProjectManager.cpp
+++ b/src/Project/ProjectManager.cpp
@@ -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 );
}
More information about the Vlmc-devel
mailing list