Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 5e6b8ae
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gui/processing/qgsprocessingwidgetwrapperimpl.cpp
Expand Up @@ -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 );
}
Expand Down

0 comments on commit 5e6b8ae

Please sign in to comment.