30 static int addedIdLowWaterMark = -1;
33 addedIdLowWaterMark--;
35 QgsDebugMsg(
"Assigned feature id " + QString::number( addedIdLowWaterMark ) );
80 mOldAddedFeature = it.value();
122 mOldGeom =
new QgsGeometry( *it.value().geometry() );
129 mOldGeom = ( changedAlready && cachedGeom ) ?
new QgsGeometry( geom ) : 0;
142 if ( other->id() !=
id() )
149 if ( merge->mFid != mFid )
153 mNewGeom = merge->mNewGeom;
172 it.value().setGeometry( *mOldGeom );
209 it.value().setGeometry( *mNewGeom );
223 , mFieldIndex( fieldIndex )
224 , mOldValue( oldValue )
225 , mNewValue( newValue )
226 , mFirstChange( true )
233 if ( it.value().attribute( mFieldIndex ).isValid() )
235 mOldValue = it.value().attribute( mFieldIndex );
236 mFirstChange =
false;
242 mFirstChange =
false;
249 QVariant original = mOldValue;
256 it.value().setAttribute( mFieldIndex, mOldValue );
258 else if ( mFirstChange )
265 if ( !mOldValue.isValid() )
293 it.value().setAttribute( mFieldIndex, mNewValue );
344 , mFieldIndex( fieldIndex )
351 if ( !mProviderField )
361 mDeletedValues.insert( f.
id(), f.
attribute( mFieldIndex ) );
368 if ( attrs.contains( mFieldIndex ) )
369 mDeletedValues.insert( it.key(), attrs[mFieldIndex] );
375 if ( mProviderField )
395 for ( QMap<QgsFeatureId, QVariant>::const_iterator it = mDeletedValues.begin(); it != mDeletedValues.end(); ++it )
400 attrs.insert( mFieldIndex, it.value() );
409 if ( mProviderField )