Skip to content

Commit

Permalink
Fix atlas filtering when exporting using processing algorithms
Browse files Browse the repository at this point in the history
Fixes #44242
  • Loading branch information
Samweli committed Aug 2, 2021
1 parent b6f2521 commit 424021a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/analysis/processing/qgsalgorithmlayoutatlastoimage.cpp
Expand Up @@ -141,6 +141,7 @@ QVariantMap QgsLayoutAtlasToImageAlgorithm::processAlgorithm( const QVariantMap

expression = parameterAsString( parameters, QStringLiteral( "FILTER_EXPRESSION" ), context );
atlas->setFilterExpression( expression, error );
atlas->setFilterFeatures( !expression.isEmpty() && error.isEmpty() );
if ( !expression.isEmpty() && !error.isEmpty() )
{
throw QgsProcessingException( QObject::tr( "Error setting atlas filter expression" ) );
Expand Down
1 change: 1 addition & 0 deletions src/analysis/processing/qgsalgorithmlayoutatlastopdf.cpp
Expand Up @@ -143,6 +143,7 @@ QVariantMap QgsLayoutAtlasToPdfAlgorithm::processAlgorithm( const QVariantMap &p

expression = parameterAsString( parameters, QStringLiteral( "FILTER_EXPRESSION" ), context );
atlas->setFilterExpression( expression, error );
atlas->setFilterFeatures( !expression.isEmpty() && error.isEmpty() );
if ( !expression.isEmpty() && !error.isEmpty() )
{
throw QgsProcessingException( QObject::tr( "Error setting atlas filter expression" ) );
Expand Down

0 comments on commit 424021a

Please sign in to comment.