diff --git a/include/ConfigManager.h b/include/ConfigManager.h index 36fbdebb5..1e53e97a7 100644 --- a/include/ConfigManager.h +++ b/include/ConfigManager.h @@ -41,6 +41,7 @@ class Engine; const QString PROJECTS_PATH = "projects/"; +const QString TEMPLATE_PATH = "templates/"; const QString PRESETS_PATH = "presets/"; const QString SAMPLES_PATH = "samples/"; const QString DEFAULT_THEME_PATH = "themes/default/"; diff --git a/src/core/ConfigManager.cpp b/src/core/ConfigManager.cpp index 1254977f0..8c4aa2974 100644 --- a/src/core/ConfigManager.cpp +++ b/src/core/ConfigManager.cpp @@ -423,6 +423,7 @@ void ConfigManager::loadConfigFile() if( QDir( m_workingDir ).exists() ) { QDir().mkpath( userProjectsDir() ); + QDir().mkpath( userProjectsDir() + TEMPLATE_PATH ); QDir().mkpath( userSamplesDir() ); QDir().mkpath( userPresetsDir() ); } diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 9a0afbe38..a52d5d80d 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -738,6 +738,15 @@ void MainWindow::createNewProject() { Engine::getSong()->createNewProject(); } + QString default_template = ConfigManager::inst()->userProjectsDir() + + "templates/default.mpt"; + + //if we dont have a user default template, make one + if( !QFile::exists( default_template ) ) + { + Engine::getSong()->saveProjectFile( ConfigManager::inst()->userProjectsDir() + + "templates/default.mpt" ); + } }