Skip to content

Commit

Permalink
Fix failing composer map tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 13, 2017
1 parent a271199 commit 3ffeabe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/core/composer/qgscomposermap.cpp
Expand Up @@ -1500,6 +1500,7 @@ QList<QgsMapLayer *> QgsComposerMap::layers() const

void QgsComposerMap::setLayers( const QList<QgsMapLayer *> &layers )
{
mKeepLayerSet = true;
mLayers = _qgis_listRawToQPointer( layers );
}

Expand Down
8 changes: 4 additions & 4 deletions src/core/composer/qgscomposermap.h
Expand Up @@ -220,16 +220,16 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem
void setKeepLayerSet( bool enabled ) {mKeepLayerSet = enabled;}

/**
* Getter for stored layer set. This will usually be synchronized with the main app canvas
* layer set (and layer order), unless the keepLayerSet() flag is true.
* Getter for stored layer set. This will only be used if the
* keepLayerSet() flag is true.
* @see setLayers()
* @see keepLayerSet()
*/
QList<QgsMapLayer *> layers() const;

/**
* Setter for stored layer set. This will usually be synchronized with the main app canvas
* layer set (and layer order), unless the keepLayerSet() flag is true.
* Setter for stored layer set. Calling this will automatically set
* keepLayerSet() to true.
* @see layers()
* @see keepLayerSet()
*/
Expand Down
1 change: 0 additions & 1 deletion src/gui/qgscomposerview.cpp
Expand Up @@ -1001,7 +1001,6 @@ void QgsComposerView::mouseReleaseEvent( QMouseEvent *e )
if ( mCanvas )
{
composerMap->zoomToExtent( mCanvas->mapSettings().visibleExtent() );
composerMap->setLayers( mCanvas->mapSettings().layers() );
}

composition()->addComposerMap( composerMap );
Expand Down

0 comments on commit 3ffeabe

Please sign in to comment.