Skip to content
Permalink
Browse files

Improve onFeatureAdded and onAttributeValueChanged

  • Loading branch information
lbartoletti committed Apr 30, 2018
1 parent 07caafe commit 68f463e34d97ff4beb6f8a5300fe8c2464760695
Showing with 8 additions and 4 deletions.
  1. +8 −4 src/core/qgspointlocator.cpp
@@ -842,10 +842,11 @@ void QgsPointLocator::onFeatureAdded( QgsFeatureId fid )
if ( !f.hasGeometry() )
return;

std::unique_ptr< QgsFeatureRenderer > renderer( mLayer->renderer() ? mLayer->renderer()->clone() : nullptr );
QgsRenderContext *ctx = nullptr;
if ( mContext )
{
std::unique_ptr< QgsFeatureRenderer > renderer( mLayer->renderer() ? mLayer->renderer()->clone() : nullptr );
QgsRenderContext *ctx = nullptr;

mContext->expressionContext() << QgsExpressionContextUtils::layerScope( mLayer );
ctx = mContext.get();
if ( renderer && ctx )
@@ -920,8 +921,11 @@ void QgsPointLocator::onAttributeValueChanged( QgsFeatureId fid, int idx, const
{
Q_UNUSED( idx );
Q_UNUSED( value );
onFeatureDeleted( fid );
onFeatureAdded( fid );
if ( mContext )
{
onFeatureDeleted( fid );
onFeatureAdded( fid );
}
}


0 comments on commit 68f463e

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