Skip to content

Commit

Permalink
[processing] Don't default to input field for optional expression par…
Browse files Browse the repository at this point in the history
…ameters

Fixes #41063
  • Loading branch information
nyalldawson committed Jan 20, 2021
1 parent 5d14c61 commit 1fed902
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/processing/qgsprocessingwidgetwrapperimpl.cpp
Expand Up @@ -1951,6 +1951,9 @@ QWidget *QgsProcessingExpressionWidgetWrapper::createWidget()
mFieldExpWidget->setToolTip( parameterDefinition()->toolTip() );
mFieldExpWidget->setExpressionDialogTitle( parameterDefinition()->description() );
mFieldExpWidget->registerExpressionContextGenerator( this );
if ( expParam->flags() & QgsProcessingParameterDefinition::FlagOptional )
mFieldExpWidget->setAllowEmptyFieldName( true );

connect( mFieldExpWidget, static_cast < void ( QgsFieldExpressionWidget::* )( const QString & ) >( &QgsFieldExpressionWidget::fieldChanged ), this, [ = ]( const QString & )
{
emit widgetValueHasChanged( this );
Expand Down

0 comments on commit 1fed902

Please sign in to comment.