mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[BUGFIX] Emit layerWillBeRemoved like layersWillBeRemoved (#3194)
The signal layerWillBeremoved is only emitted when the layer is owned by QgsMapLayerRegistry. To fix it just move the emitted layerWilBeRemoved out of the scope of layers owned by QgsMapLayerRegistry.
This commit is contained in:
parent
c66906dbe2
commit
d9a79c9381
@ -144,10 +144,10 @@ void QgsMapLayerRegistry::removeMapLayers( const QList<QgsMapLayer*>& layers )
|
||||
continue;
|
||||
|
||||
QString myId( lyr->id() );
|
||||
emit layerWillBeRemoved( myId );
|
||||
emit layerWillBeRemoved( lyr );
|
||||
if ( mOwnedLayers.contains( lyr ) )
|
||||
{
|
||||
emit layerWillBeRemoved( myId );
|
||||
emit layerWillBeRemoved( lyr );
|
||||
delete lyr;
|
||||
mOwnedLayers.remove( lyr );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user