diff --git a/src/core/qgsproject.cpp b/src/core/qgsproject.cpp index 0e69b4ac3ec..8c359198408 100644 --- a/src/core/qgsproject.cpp +++ b/src/core/qgsproject.cpp @@ -492,8 +492,6 @@ void QgsProject::clear() mMapThemeCollection.reset( new QgsMapThemeCollection( this ) ); emit mapThemeCollectionChanged(); - mRootGroup->clear(); - mLabelingEngineSettings->clear(); mArchive->clear(); @@ -512,6 +510,8 @@ void QgsProject::clear() writeEntry( QStringLiteral( "Measurement" ), QStringLiteral( "/AreaUnits" ), s.value( QStringLiteral( "/qgis/measure/areaunits" ) ).toString() ); removeAllMapLayers(); + mRootGroup->clear(); + setDirty( false ); }