Skip to content
Permalink
Browse files

The store can now add invalid maplayers

  • Loading branch information
elpaso committed Oct 20, 2018
1 parent bac5fbb commit bc4a1efac4d09983254b2f5a67f1a3fcfdb0ea8d
@@ -104,7 +104,7 @@ The layersAdded() and layerWasAdded() signals will always be emitted.
the layers yourself. Not available in Python.

:return: a list of the map layers that were added
successfully. If a layer is invalid, or already exists in the store,
successfully. If a layer already exists in the store,
it will not be part of the returned list.


@@ -55,9 +55,9 @@ QList<QgsMapLayer *> QgsMapLayerStore::addMapLayers( const QList<QgsMapLayer *>
QList<QgsMapLayer *> myResultList;
Q_FOREACH ( QgsMapLayer *myLayer, layers )
{
if ( !myLayer || !myLayer->isValid() )
if ( !myLayer )
{
QgsDebugMsg( QStringLiteral( "Cannot add invalid layers" ) );
QgsDebugMsg( QStringLiteral( "Cannot add null layers" ) );
continue;
}
//check the layer is not already registered!
@@ -135,7 +135,7 @@ class CORE_EXPORT QgsMapLayerStore : public QObject
* the layers yourself. Not available in Python.
*
* \returns a list of the map layers that were added
* successfully. If a layer is invalid, or already exists in the store,
* successfully. If a layer already exists in the store,
* it will not be part of the returned list.
*
* \see addMapLayer()

0 comments on commit bc4a1ef

Please sign in to comment.
You can’t perform that action at this time.