Skip to content
Permalink
Browse files
Zoom to layer extent when adding the first layer
  • Loading branch information
mhugent committed Apr 6, 2012
1 parent fdceb2f commit 30eaf192e731aeaa74780123ada445bfda971737
Showing 1 changed file with 4 additions and 1 deletion.
@@ -872,7 +872,10 @@ void QgsLegend::addLayers( QList<QgsMapLayer *> theLayerList )
//Note if the canvas was previously blank so we can
//zoom to all layers at the end if neeeded
bool myFirstLayerFlag = false;
if ( layers().count() > 0 ) myFirstLayerFlag = true;
if ( layers().count() < 1 )
{
myFirstLayerFlag = true;
}

//iteratively add the layers to the canvas
for ( int i = 0; i < theLayerList.size(); ++i )

0 comments on commit 30eaf19

Please sign in to comment.