Salome HOME
Fix for exception on deletion of a Part from PartSet when it is active
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintMirror.cpp
index d63c196a4e754a309447dc41ea979276079a1451..42ed4d5b48911f67d7396b26352780bfe8502dc5 100755 (executable)
@@ -229,7 +229,6 @@ void SketchPlugin_ConstraintMirror::erase()
   SketchPlugin_ConstraintBase::erase();
 }
 
-#include <ModelAPI_AttributeRefAttrList.h>
 void SketchPlugin_ConstraintMirror::attributeChanged(const std::string& theID)
 {
   if (theID == MIRROR_LIST_ID()) {
@@ -240,8 +239,8 @@ void SketchPlugin_ConstraintMirror::attributeChanged(const std::string& theID)
       AttributeRefListPtr aRefListOfMirrored = std::dynamic_pointer_cast<ModelAPI_AttributeRefList>(
           data()->attribute(SketchPlugin_Constraint::ENTITY_C()));
       std::list<ObjectPtr> aTargetList = aRefListOfMirrored->list();
-      std::list<ObjectPtr>::reverse_iterator aTargetIter = aTargetList.rbegin();
-      for (; aTargetIter != aTargetList.rend(); aTargetIter++) {
+      std::list<ObjectPtr>::iterator aTargetIter = aTargetList.begin();
+      for (; aTargetIter != aTargetList.end(); aTargetIter++) {
         FeaturePtr aFeature = ModelAPI_Feature::feature(*aTargetIter);
         if (aFeature)
           aDoc->removeFeature(aFeature);