owner()->data()->sendAttributeUpdated(this);
}
+void Model_AttributeSelectionList::removeLast()
+{
+ int anOldSize = mySize->Get();
+ if (anOldSize != 0) {
+ mySize->Set(anOldSize - 1);
+ TDF_Label aLab = mySize->Label().FindChild(anOldSize);
+ std::shared_ptr<Model_AttributeSelection> aOldAttr =
+ std::shared_ptr<Model_AttributeSelection>(new Model_AttributeSelection(aLab));
+ aOldAttr->setObject(owner());
+ REMOVE_BACK_REF(aOldAttr->context());
+ aLab.ForgetAllAttributes(Standard_True);
+ owner()->data()->sendAttributeUpdated(this);
+ }
+}
+
int Model_AttributeSelectionList::size()
{
return mySize->Get();
/// The type of shape is taken from the current selection type
MODEL_EXPORT virtual void append(std::string theNamingName);
+ /// Removes the last element in the list
+ MODEL_EXPORT virtual void removeLast();
+
/// Returns the number ofselection attributes in the list
MODEL_EXPORT virtual int size();
/// The type of shape is taken from the current selection type
virtual void append(std::string theNamingName) = 0;
+ /// Removes the last element in the list
+ virtual void removeLast() = 0;
+
/// Returns the number of selection attributes in the list
virtual int size() = 0;