Skip to content

Commit

Permalink
Do not set constraints from the layer
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus authored and nyalldawson committed Dec 21, 2020
1 parent 11026c4 commit 0f4a830
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/gui/processing/qgsprocessingfieldmapwidgetwrapper.cpp
Expand Up @@ -131,13 +131,7 @@ void QgsProcessingFieldMapPanelWidget::setValue( const QVariant &value )
map.value( QStringLiteral( "length" ), 0 ).toInt(),
map.value( QStringLiteral( "precision" ), 0 ).toInt() );

int layerFieldIdx = layerFields.indexFromName( f.name() );

if ( mLayer && layerFieldIdx >= 0 && ! map.contains( QStringLiteral( "constraints" ) ) )
{
f.setConstraints( layerFields.at( layerFieldIdx ).constraints() );
}
else
if ( map.contains( QStringLiteral( "constraints" ) ) )
{
const QgsFieldConstraints::Constraints constraints = static_cast<QgsFieldConstraints::Constraints>( map.value( QStringLiteral( "constraints" ), 0 ).toInt() );
QgsFieldConstraints fieldConstraints;
Expand Down

0 comments on commit 0f4a830

Please sign in to comment.