Skip to content

Commit 6489b62

Browse files
committed
add layer scope in context to evaluate the constraint expression
1 parent 3947cb9 commit 6489b62

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/gui/editorwidgets/core/qgseditorwidgetwrapper.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ void QgsEditorWidgetWrapper::updateConstraint( const QgsFeature &ft )
114114
{
115115
QgsExpressionContext context =
116116
QgsExpressionContextUtils::createFeatureBasedContext( ft, *ft.fields() );
117+
context << QgsExpressionContextUtils::layerScope( layer() );
117118

118119
context.setFeature( ft );
119120
QgsExpression expr( expression );

0 commit comments

Comments
 (0)