+ std::vector<EntityWrapperPtr>::iterator anEntIt = myMovedEntities.begin();
+ for (; anEntIt != myMovedEntities.end(); ++anEntIt)
+ fixFeature(*anEntIt);
+}
+
+
+static std::list<EntityWrapperPtr> movedEntities(
+ EntityWrapperPtr theOld, StoragePtr theOldStorage,
+ EntityWrapperPtr theNew, StoragePtr theNewStorage)
+{
+ bool isFullyMoved = true;
+ std::list<EntityWrapperPtr> aMoved;
+ if (theOld->isEqual(theNew))
+ return aMoved;
+
+ std::list<EntityWrapperPtr> anOldSubs = theOld->subEntities();
+ std::list<EntityWrapperPtr> aNewSubs = theNew->subEntities();
+ std::list<EntityWrapperPtr>::const_iterator anOldIt = anOldSubs.begin();
+ std::list<EntityWrapperPtr>::const_iterator aNewIt = aNewSubs.begin();
+ for (; anOldIt != anOldSubs.end() && aNewIt != aNewSubs.end(); ++anOldIt, ++aNewIt) {
+ std::list<EntityWrapperPtr> aMovedSubs = movedEntities(
+ *anOldIt, theOldStorage, *aNewIt, theNewStorage);
+ // check only the points to be moved (because arcs in PlaneGCS have scalar subs too)
+ if ((*anOldIt)->type() == ENTITY_POINT &&
+ (aMovedSubs.size() != 1 || aMovedSubs.front() != *anOldIt))
+ isFullyMoved = false;
+ aMoved.insert(aMoved.end(), aMovedSubs.begin(), aMovedSubs.end());
+ }
+ if (isFullyMoved) {
+ aMoved.clear();
+ aMoved.push_back(theOld);