Skip to content

Commit

Permalink
Ensure newly added composer maps show layers visible in canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 26, 2017
1 parent c861682 commit 8f62f83
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/qgscomposerview.cpp
Expand Up @@ -998,7 +998,10 @@ void QgsComposerView::mouseReleaseEvent( QMouseEvent* e )
{
QgsComposerMap* composerMap = new QgsComposerMap( composition(), mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(), mRubberBandItem->rect().width(), mRubberBandItem->rect().height() );
if ( mCanvas )
{
composerMap->zoomToExtent( mCanvas->mapSettings().visibleExtent() );
composerMap->setLayers( mCanvas->mapSettings().layers() );
}

composition()->addComposerMap( composerMap );

Expand Down

0 comments on commit 8f62f83

Please sign in to comment.