Skip to content

Commit

Permalink
block vector layer signals when updating attribute values from field …
Browse files Browse the repository at this point in the history
…calculator (fixes #7190)
  • Loading branch information
jef-n committed Feb 22, 2013
1 parent b4e7228 commit da60fe1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/app/qgsfieldcalculator.cpp
Expand Up @@ -184,7 +184,10 @@ void QgsFieldCalculator::accept()
}
else
{
// FIXME workaround while QgsVectorLayer::changeAttributeValue's emitSignal is ignored (see #7190)
mVectorLayer->blockSignals( true );
mVectorLayer->changeAttributeValue( feature.id(), mAttributeId, value, false );
mVectorLayer->blockSignals( false );
}

rownum++;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayer.cpp
Expand Up @@ -3175,7 +3175,7 @@ bool QgsVectorLayer::changeGeometry( QgsFeatureId fid, QgsGeometry* geom )

bool QgsVectorLayer::changeAttributeValue( QgsFeatureId fid, int field, QVariant value, bool emitSignal )
{
Q_UNUSED( emitSignal ); // TODO[MD]
Q_UNUSED( emitSignal ); // TODO[MD] - see also QgsFieldCalculator and #7190
if ( !mEditBuffer || !mDataProvider )
return false;

Expand Down

0 comments on commit da60fe1

Please sign in to comment.