Skip to content

Commit

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

Fixes #41063

(cherry picked from commit 1fed902)
  • Loading branch information
nyalldawson committed Feb 19, 2021
1 parent 64ff2c9 commit 6c095d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/processing/qgsprocessingwidgetwrapperimpl.cpp
Expand Up @@ -1948,6 +1948,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 6c095d2

Please sign in to comment.