Skip to content

Commit

Permalink
Fixed bug with signal being emitted declaring layers were added but h…
Browse files Browse the repository at this point in the history
…aving a zero length layer list
  • Loading branch information
timlinux committed Apr 14, 2012
1 parent 23d5362 commit ba003e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/qgsmaplayerregistry.cpp
Expand Up @@ -84,8 +84,10 @@ QList<QgsMapLayer *> QgsMapLayerRegistry::addMapLayers(
emit layerWasAdded( myLayer );
}
}
if ( theEmitSignal )
if ( theEmitSignal && myResultList.count() > 0 )
{
emit layersAdded( myResultList );
}
return myResultList;
} // QgsMapLayerRegistry::addMapLayers

Expand Down

0 comments on commit ba003e6

Please sign in to comment.