mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Fix crash when closing a project with layers in edition (fixes #16771)
Delete layers from project & not through layers tree, avoiding double deletion of layers.
This commit is contained in:
parent
5e945461fe
commit
37052db39a
@ -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 );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user