diff --git a/src/core/qgsmaplayerregistry.cpp b/src/core/qgsmaplayerregistry.cpp index 5316f248128e..5d5d8a85fba4 100644 --- a/src/core/qgsmaplayerregistry.cpp +++ b/src/core/qgsmaplayerregistry.cpp @@ -84,8 +84,10 @@ QList QgsMapLayerRegistry::addMapLayers( emit layerWasAdded( myLayer ); } } - if ( theEmitSignal ) + if ( theEmitSignal && myResultList.count() > 0 ) + { emit layersAdded( myResultList ); + } return myResultList; } // QgsMapLayerRegistry::addMapLayers