Skip to content

Commit

Permalink
Remove autogenerated metadata when loading an older project
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 22, 2018
1 parent 37c5dd9 commit 6b1255b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/qgsproject.cpp
Expand Up @@ -985,6 +985,11 @@ bool QgsProject::readProjectFile( const QString &filename )
QDomElement metadataElement = nl.at( 0 ).toElement();
mMetadata.readMetadataXml( metadataElement );
}
else
{
// older project, no metadata => remove auto generated metadata which is populated on QgsProject::clear()
mMetadata = QgsProjectMetadata();
}
if ( mMetadata.title().isEmpty() && !oldTitle.isEmpty() )
{
// upgrade older title storage to storing within project metadata.
Expand Down

0 comments on commit 6b1255b

Please sign in to comment.