Skip to content
Permalink
Browse files
[composer] Fix maps defaulting to rectangle preview mode
  • Loading branch information
nyalldawson committed Mar 22, 2017
1 parent 7c79803 commit 1042b442ca46568df1225aa038472fb617f48518
Showing with 2 additions and 3 deletions.
  1. +1 −1 src/core/composer/qgscomposermap.h
  2. +1 −2 src/gui/qgscomposerview.cpp
@@ -517,7 +517,7 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
bool mCacheUpdated = false;

//! \brief Preview style
PreviewMode mPreviewMode = QgsComposerMap::Rectangle;
PreviewMode mPreviewMode = QgsComposerMap::Cache;

//! \brief Number of layers when cache was created
int mNumCachedLayers;
@@ -998,13 +998,12 @@ void QgsComposerView::mouseReleaseEvent( QMouseEvent *e )
else
{
QgsComposerMap *composerMap = new QgsComposerMap( composition(), mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(), mRubberBandItem->rect().width(), mRubberBandItem->rect().height() );
composition()->addComposerMap( composerMap );
if ( mCanvas )
{
composerMap->zoomToExtent( mCanvas->mapSettings().visibleExtent() );
}

composition()->addComposerMap( composerMap );

composition()->setAllDeselected();
composerMap->setSelected( true );
emit selectedItemChanged( composerMap );

0 comments on commit 1042b44

Please sign in to comment.