Skip to content
Permalink
Browse files
block vector layer signals when updating attribute values from field …
…calculator (fixes #7190)
  • Loading branch information
jef-n committed Feb 22, 2013
1 parent b4e7228 commit da60fe1c830d45c2cc69838807c50463eb021ab8
Showing with 4 additions and 1 deletion.
  1. +3 −0 src/app/qgsfieldcalculator.cpp
  2. +1 −1 src/core/qgsvectorlayer.cpp
@@ -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++;
@@ -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;

0 comments on commit da60fe1

Please sign in to comment.