Skip to content
Permalink
Browse files

Do not set constraints from the layer

  • Loading branch information
suricactus authored and nyalldawson committed Dec 21, 2020
1 parent 11026c4 commit 0f4a830c41e478c1066d8bf57d14957bd8fe304a
Showing with 1 addition and 7 deletions.
  1. +1 −7 src/gui/processing/qgsprocessingfieldmapwidgetwrapper.cpp
@@ -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;

0 comments on commit 0f4a830

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