We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e97153 commit 9626f58Copy full SHA for 9626f58
src/gui/editorwidgets/core/qgseditorwidgetwrapper.cpp
@@ -117,11 +117,9 @@ void QgsEditorWidgetWrapper::updateConstraint( const QgsFeature &ft )
117
{
118
description = layer()->editFormConfig().expressionDescription( mFieldIdx );
119
120
- QgsExpressionContext context =
121
- QgsExpressionContextUtils::createFeatureBasedContext( ft, ft.fields() );
122
- context << QgsExpressionContextUtils::layerScope( layer() );
123
-
+ QgsExpressionContext context = layer()->createExpressionContext();
124
context.setFeature( ft );
+
125
QgsExpression expr( expression );
126
127
mValidConstraint = expr.evaluate( &context ).toBool();
0 commit comments