Skip to content
Permalink
Browse files

add exsting parent layer to the list if no other options are available

  • Loading branch information
alexbruy committed Mar 19, 2020
1 parent 175fa78 commit 5e6b8aefee198119c3ee61d3f282c0bc2c1e0488
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/gui/processing/qgsprocessingwidgetwrapperimpl.cpp
@@ -1616,6 +1616,13 @@ QgsProcessingExpressionParameterDefinitionWidget::QgsProcessingExpressionParamet
}
}

if ( mParentLayerComboBox->count() == 0 && !initialParent.isEmpty() )
{
// if no parent candidates found, we just add the existing one as a placeholder
mParentLayerComboBox->addItem( initialParent, initialParent );
mParentLayerComboBox->setCurrentIndex( mParentLayerComboBox->count() - 1 );
}

vlayout->addWidget( mParentLayerComboBox );
setLayout( vlayout );
}

0 comments on commit 5e6b8ae

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