Skip to content

Commit

Permalink
Create proper expression context
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Apr 9, 2018
1 parent 69d77a7 commit 0204e44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/analysis/processing/qgsalgorithmfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ void QgsFilterAlgorithm::initAlgorithm( const QVariantMap &configuration )

QVariantMap QgsFilterAlgorithm::processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback )
{
std::unique_ptr< QgsFeatureSource > source( parameterAsSource( parameters, QStringLiteral( "INPUT" ), context ) );
std::unique_ptr< QgsProcessingFeatureSource > source( parameterAsSource( parameters, QStringLiteral( "INPUT" ), context ) );
if ( !source )
return QVariantMap();

QgsExpressionContext expressionContext = context.expressionContext();
QgsExpressionContext expressionContext = createExpressionContext( parameters, context, source.get() );
for ( Output *output : qgis::as_const( mOutputs ) )
{
output->sink.reset( parameterAsSink( parameters, output->name, context, output->destinationIdentifier, source->fields(), source->wkbType(), source->sourceCrs() ) );
Expand Down

0 comments on commit 0204e44

Please sign in to comment.