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 qgis#41063
  • Loading branch information
nyalldawson committed Jan 19, 2021
1 parent 5b2685d commit 0374623
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/processing/qgsprocessingwidgetwrapperimpl.cpp
Original file line number Diff line number Diff line change
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 0374623

Please sign in to comment.