- // created objects are always must be up to date (python box feature)
- // and updated not in internal uptation chain
- myUpdated[*anObjIter] = myModification;
-
- // something is updated during the execution: re-execute it (sketch update by parameters or
- // Box macro that updates the upper features during the execution)
- if (myIsExecuted) {
- FeaturePtr anUpdated = std::dynamic_pointer_cast<ModelAPI_Feature>(*anObjIter);
- if (anUpdated.get() && anUpdated->data()->isValid())
- iterateUpdateBreak(anUpdated);
- }
- #ifdef DEB_UPDATE
- if (myIsExecuted) std::cout<<"During execution ";
- if ((*anObjIter)->data() && (*anObjIter)->data()->isValid()) {
- std::cout<<"add updated "<<(*anObjIter)->groupName()<<" "
- <<(*anObjIter)->data()->name()<<std::endl;
+ // on undo/redo, abort do not update persisten features
+ FeaturePtr anUpdated = std::dynamic_pointer_cast<ModelAPI_Feature>(*anObjIter);
+ if (std::dynamic_pointer_cast<Model_Document>((*anObjIter)->document())->executeFeatures() ||
+ (anUpdated.get() && !anUpdated->isPersistentResult())) {
+ // created objects are always must be up to date (python box feature)
+ // and updated not in internal uptation chain
+ myUpdated[*anObjIter] = myModification;
+
+ // something is updated during the execution: re-execute it (sketch update by parameters or
+ // Box macro that updates the upper features during the execution)
+ if (myIsExecuted) {
+ FeaturePtr anUpdated = std::dynamic_pointer_cast<ModelAPI_Feature>(*anObjIter);
+ if (anUpdated.get() && anUpdated->data()->isValid())
+ iterateUpdateBreak(anUpdated);
+ }
+#ifdef DEB_UPDATE
+ if (myIsExecuted) std::cout<<"During execution ";
+ if ((*anObjIter)->data() && (*anObjIter)->data()->isValid()) {
+ std::cout<<"add updated "<<(*anObjIter)->groupName()<<" "
+ <<(*anObjIter)->data()->name()<<std::endl;
+ }
+#endif