Skip to content

Commit

Permalink
Fix qgsatlascomposition constructor and related Atlas unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hugo Mercier committed Apr 11, 2013
1 parent f59e21c commit f0dd138
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/composer/qgsatlascomposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ QgsAtlasComposition::QgsAtlasComposition( QgsComposition* composition ) :
mComposerMap( 0 ),
mHideCoverage( false ), mFixedScale( false ), mMargin( 0.10 ), mFilenamePattern( "'output_'||$feature" ),
mCoverageLayer( 0 ), mSingleFile( false ),
mSortFeatures( false ), mSortAscending( true ), mFeatureFilter( "" )
mSortFeatures( false ), mSortAscending( true ),
mFilterFeatures( false ), mFeatureFilter( "" )
{

// declare special columns with a default value
Expand Down
1 change: 1 addition & 0 deletions tests/src/core/testqgsatlascomposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ void TestQgsAtlasComposition::filtering_render()

mAtlas->setSortFeatures( false );

mAtlas->setFilterFeatures( true );
mAtlas->setFeatureFilter( "substr(NAME_1,1,1)='P'" ); // select only 'Pays de la Loire'

mAtlas->beginRender();
Expand Down
1 change: 1 addition & 0 deletions tests/src/python/test_qgsatlascomposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ def filtering_render_test( self ):

self.mAtlas.setSortFeatures( False )

self.mAtlas.setFilterFeatures( True )
self.mAtlas.setFeatureFilter( "substr(NAME_1,1,1)='P'" ) # select only 'Pays de la loire'

self.mAtlas.beginRender()
Expand Down

0 comments on commit f0dd138

Please sign in to comment.