Skip to content
Permalink
Browse files

Fix failing composer map tests

  • Loading branch information
nyalldawson committed Mar 13, 2017
1 parent a271199 commit 3ffeabe2aa97f015485ff6ad9b9b0d4a0151446f
Showing with 5 additions and 5 deletions.
  1. +1 −0 src/core/composer/qgscomposermap.cpp
  2. +4 −4 src/core/composer/qgscomposermap.h
  3. +0 −1 src/gui/qgscomposerview.cpp
@@ -1500,6 +1500,7 @@ QList<QgsMapLayer *> QgsComposerMap::layers() const

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

@@ -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()
*/
@@ -1001,7 +1001,6 @@ void QgsComposerView::mouseReleaseEvent( QMouseEvent *e )
if ( mCanvas )
{
composerMap->zoomToExtent( mCanvas->mapSettings().visibleExtent() );
composerMap->setLayers( mCanvas->mapSettings().layers() );
}

composition()->addComposerMap( composerMap );

0 comments on commit 3ffeabe

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