Skip to content
Permalink
Browse files

Ensure newly added composer maps show layers visible in canvas

  • Loading branch information
nyalldawson committed Jan 26, 2017
1 parent c861682 commit 8f62f834f2a4d74d750685d18bcd8ae408b8753f
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/gui/qgscomposerview.cpp
@@ -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 );

0 comments on commit 8f62f83

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