Skip to content
Permalink
Browse files

[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 6c095d2657b7e30642f01b5acc757ed1feec8b8f
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/gui/processing/qgsprocessingwidgetwrapperimpl.cpp
@@ -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 );

0 comments on commit 6c095d2

Please sign in to comment.