Skip to content

Commit

Permalink
Add MultipleLayers parameter in field parameter definition widget
Browse files Browse the repository at this point in the history
  • Loading branch information
troopa81 authored and nyalldawson committed Dec 9, 2020
1 parent 1e89dd0 commit e779bf9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/gui/processing/qgsprocessingwidgetwrapperimpl.cpp
Expand Up @@ -3907,6 +3907,17 @@ QgsProcessingFieldParameterDefinitionWidget::QgsProcessingFieldParameterDefiniti
mParentLayerComboBox->setCurrentIndex( mParentLayerComboBox->count() - 1 );
}
}
else if ( const QgsProcessingParameterMultipleLayers *definition = dynamic_cast< const QgsProcessingParameterMultipleLayers * >( lModel->parameterDefinition( it.value().parameterName() ) ) )
{
if ( definition->layerType() == QgsProcessing::TypeVector )
{
mParentLayerComboBox-> addItem( definition->description(), definition->name() );
if ( !initialParent.isEmpty() && initialParent == definition->name() )
{
mParentLayerComboBox->setCurrentIndex( mParentLayerComboBox->count() - 1 );
}
}
}
}
}

Expand Down

0 comments on commit e779bf9

Please sign in to comment.