Skip to content
Permalink
Browse files

[processing] Correctly expose full expression context to Filter Featu…

…res algorithm

configuration widget in modeler

Allows filters to be built (in the GUI) using context related variables
and functions such as input parameter values, model variables, etc
  • Loading branch information
nyalldawson committed Feb 19, 2019
1 parent 69c7031 commit 9df7b2a02c5d8ade623ee66a112fe5cf6359759e
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/gui/processing/qgsprocessingconfigurationwidgets.cpp
@@ -100,6 +100,7 @@ void QgsFilterAlgorithmConfigurationWidget::setConfiguration( const QVariantMap
mOutputExpressionWidget->insertRow( currentRow );
mOutputExpressionWidget->setItem( currentRow, 0, new QTableWidgetItem( output.value( "name" ).toString() ) );
QgsExpressionLineEdit *expressionBuilder = new QgsExpressionLineEdit();
expressionBuilder->registerExpressionContextGenerator( this );
expressionBuilder->setExpression( output.value( "expression" ).toString() );
mOutputExpressionWidget->setCellWidget( currentRow, 1, expressionBuilder );
QCheckBox *isModelOutput = new QCheckBox();
@@ -143,6 +144,7 @@ void QgsFilterAlgorithmConfigurationWidget::addOutput()
int rowIndex = mOutputExpressionWidget->rowCount();
mOutputExpressionWidget->setRowCount( rowIndex + 1 );
QgsExpressionLineEdit *expressionBuilder = new QgsExpressionLineEdit();
expressionBuilder->registerExpressionContextGenerator( this );
mOutputExpressionWidget->setItem( rowIndex, 0, new QTableWidgetItem( QString() ) );
mOutputExpressionWidget->setCellWidget( rowIndex, 1, expressionBuilder );
mOutputExpressionWidget->setCellWidget( rowIndex, 2, new QCheckBox() );

0 comments on commit 9df7b2a

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