Set expression context for geometry generator builder (fix #14833)

This commit is contained in:
Nyall Dawson 2016-05-19 08:49:55 +10:00
parent b4e2354163
commit 7187148afb

View File

@ -3344,6 +3344,7 @@ QgsGeometryGeneratorSymbolLayerWidget::QgsGeometryGeneratorSymbolLayerWidget( co
setupUi( this ); setupUi( this );
modificationExpressionSelector->setLayer( const_cast<QgsVectorLayer*>( vl ) ); modificationExpressionSelector->setLayer( const_cast<QgsVectorLayer*>( vl ) );
modificationExpressionSelector->loadFieldNames(); modificationExpressionSelector->loadFieldNames();
modificationExpressionSelector->setExpressionContext( _getExpressionContext( this ) );
cbxGeometryType->addItem( QgsApplication::getThemeIcon( "/mIconPolygonLayer.svg" ), tr( "Polygon / MultiPolygon" ), QgsSymbolV2::Fill ); cbxGeometryType->addItem( QgsApplication::getThemeIcon( "/mIconPolygonLayer.svg" ), tr( "Polygon / MultiPolygon" ), QgsSymbolV2::Fill );
cbxGeometryType->addItem( QgsApplication::getThemeIcon( "/mIconLineLayer.svg" ), tr( "LineString / MultiLineString" ), QgsSymbolV2::Line ); cbxGeometryType->addItem( QgsApplication::getThemeIcon( "/mIconLineLayer.svg" ), tr( "LineString / MultiLineString" ), QgsSymbolV2::Line );
cbxGeometryType->addItem( QgsApplication::getThemeIcon( "/mIconPointLayer.svg" ), tr( "Point / MultiPoint" ), QgsSymbolV2::Marker ); cbxGeometryType->addItem( QgsApplication::getThemeIcon( "/mIconPointLayer.svg" ), tr( "Point / MultiPoint" ), QgsSymbolV2::Marker );