[Qgis-developer] synchronization function suggestion

Maxim Dubinin sim at gis-lab.info
Thu Apr 30 15:55:13 EDT 2009


Hi all,

Sometime ago we were stuggling with editing features within a layer. I'm not
talking about QgsVectorLayer methods that are already implemented and working fine,
but other basic geometry editing functions, that sometimes
require to store results in the same layer. Like clip, buffer etc.

The main problem is that, while methods that are already in API are
able to do that (lets take moveVertex for example), new ones should
work around to reflect changes without comitting.

So we want to propose to add a generic function to synchronize changed
geometries. This function might be useful for future
API extension or plugins, that will add functionality to work on
geometries within a layer. Something like:

bool QgsVectorLayer::updateFeature(QgsFeature &feat)
{
  mChangedGeometries[feat.id()]=*feat.geometry();
  setModified( true, true );
  return true;
}


Any thoughts?

Maxim

PS: this is from a conversation with our developer, so I might have
misinterpreted something, but it seems logical to me. We can work on
the implementation, if there are no objections.





More information about the Qgis-developer mailing list