Skip to content
Permalink
Browse files

Automatically reload project templates when a new template is added

  • Loading branch information
m-kuhn committed Oct 23, 2015
1 parent 0f2dfdb commit b9b0865ec2bd519cea77b2a4c36fb68d5f41deb2
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/app/qgisapp.cpp
@@ -668,6 +668,12 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, QWidget * parent,
legendLayerSelectionChanged();
mSaveRollbackInProgress = false;

QFileSystemWatcher* projectsTemplateWatcher = new QFileSystemWatcher( this );
QString templateDirName = settings.value( "/qgis/projectTemplateDir",
QgsApplication::qgisSettingsDirPath() + "project_templates" ).toString();
projectsTemplateWatcher->addPath( templateDirName );
connect( projectsTemplateWatcher, SIGNAL( directoryChanged( QString ) ), this, SLOT( updateProjectFromTemplates() ) );

// initialize the plugin manager
mPluginManager = new QgsPluginManager( this, restorePlugins );

0 comments on commit b9b0865

Please sign in to comment.
You can’t perform that action at this time.