Salome HOME
Issue #355 Delete: elements of sketch and constraints:
[modules/shaper.git] / src / Model / Model_AttributeRefList.cpp
index 3e4f5a21dadb9f9bdce28065578f85e1f863f158..b7719ca78f5011e5b4b32980831b452729c773f8 100644 (file)
@@ -50,6 +50,16 @@ void Model_AttributeRefList::remove(ObjectPtr theObject)
   owner()->data()->sendAttributeUpdated(this);
 }
 
+void Model_AttributeRefList::clear()
+{
+  std::list<ObjectPtr> anOldList = list();
+  myRef->Clear();
+  std::list<ObjectPtr>::iterator anOldIter = anOldList.begin();
+  for(; anOldIter != anOldList.end(); anOldIter++) {
+    REMOVE_BACK_REF((*anOldIter));
+  }
+}
+
 int Model_AttributeRefList::size() const
 {
   return myRef->Extent();