Skip to content
Permalink
Browse files

Merge pull request #2614 from SebDieBln/UpdateCachedProjectEmbedLayers

Re-Read the cached project file when its contents have changed
  • Loading branch information
jef-n committed Dec 26, 2015
2 parents 917dd05 + 9be51c4 commit a2a1c374de0f884bcf2bc738be62a0a98d06d20d
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/core/qgsproject.cpp
@@ -1667,9 +1667,12 @@ bool QgsProject::createEmbeddedLayer( const QString &layerId, const QString &pro
QgsDebugCall;

static QString prevProjectFilePath;
static QDateTime prevProjectFileTimestamp;
static QDomDocument projectDocument;

if ( projectFilePath != prevProjectFilePath )
QDateTime projectFileTimestamp = QFileInfo( projectFilePath ).lastModified();

if ( projectFilePath != prevProjectFilePath || projectFileTimestamp != prevProjectFileTimestamp )
{
prevProjectFilePath.clear();

@@ -1685,6 +1688,7 @@ bool QgsProject::createEmbeddedLayer( const QString &layerId, const QString &pro
}

prevProjectFilePath = projectFilePath;
prevProjectFileTimestamp = projectFileTimestamp;
}

// does project store pathes absolute or relative?

0 comments on commit a2a1c37

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