mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Merge pull request #2614 from SebDieBln/UpdateCachedProjectEmbedLayers
Re-Read the cached project file when its contents have changed
This commit is contained in:
commit
a2a1c374de
@ -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?
|
||||
|
Loading…
x
Reference in New Issue
Block a user