Skip to content

Commit

Permalink
[composer] Always update filename when atlas feature changes, otherwi…
Browse files Browse the repository at this point in the history
…se exporting to images when 'single file' checkbox is ticked results in no output
  • Loading branch information
nyalldawson committed May 29, 2014
1 parent d104045 commit 88b8369
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/composer/qgsatlascomposition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ void QgsAtlasComposition::prepareMap( QgsComposerMap* map )
break;
}

if ( map->atlasScalingMode() == QgsComposerMap::Fixed || isPointLayer )
if ( map->atlasScalingMode() == QgsComposerMap::Fixed || isPointLayer )
{
// only translate, keep the original scale (i.e. width x height)

Expand Down Expand Up @@ -683,7 +683,7 @@ void QgsAtlasComposition::updateFilenameExpression()

const QgsFields& fields = mCoverageLayer->pendingFields();

if ( !mSingleFile && mFilenamePattern.size() > 0 )
if ( mFilenamePattern.size() > 0 )
{
mFilenameExpr = std::auto_ptr<QgsExpression>( new QgsExpression( mFilenamePattern ) );
// expression used to evaluate each filename
Expand All @@ -708,7 +708,7 @@ void QgsAtlasComposition::updateFilenameExpression()
void QgsAtlasComposition::evalFeatureFilename()
{
//generate filename for current atlas feature
if ( !mSingleFile && mFilenamePattern.size() > 0 )
if ( mFilenamePattern.size() > 0 )
{
QVariant filenameRes = mFilenameExpr->evaluate( &mCurrentFeature, mCoverageLayer->pendingFields() );
if ( mFilenameExpr->hasEvalError() )
Expand Down

0 comments on commit 88b8369

Please sign in to comment.