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

ProjectManager: Create a project file when creating a new project.

This avoid the user to be queried with the project file name just after
creating a project.
parent 520451f5
......@@ -176,11 +176,13 @@ GUIProjectManager::closeProject()
}
void
GUIProjectManager::newProject( const QString &projectName )
GUIProjectManager::newProject( const QString &projectName, const QString &workspacePath )
{
if ( closeProject() == false )
return ;
m_projectName = projectName;
//Current project file has already been delete/nulled by ProjectManager::closeProject()
m_projectFile = new QFile( workspacePath + '/' + "project.vlmc" );
emit projectUpdated( this->projectName(), false );
}
......
......@@ -36,7 +36,7 @@ public:
GUIProjectManager();
bool askForSaveIfModified();
void newProject( const QString& projectName );
void newProject( const QString& projectName, const QString &workspacePath );
/**
* \brief Save the project using the current project file.
*/
......
......@@ -100,7 +100,7 @@ ProjectWizard::accept()
if ( currentId() == Page_Video )
{
SettingsManager *sManager = SettingsManager::getInstance();
GUIProjectManager::getInstance()->newProject( field( "projectName" ).toString() );
GUIProjectManager::getInstance()->newProject( field( "projectName" ).toString(), field( "workspace" ).toString() );
sManager->setValue( "general/Workspace", field( "workspace" ), SettingsManager::Project );
sManager->setValue( "video/VLMCOutputFPS", field( "fps" ), SettingsManager::Project );
......
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