X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_AttributeSelectionList.cpp;h=9fb4124075eac962de1a6d8b15a7770541194003;hb=88be48ed1ea478b9d9d6ac2d965092418ef4dae6;hp=7575ca2f91bb0237a965e3d38927b3fb5dc1f96b;hpb=d21a0974f79da3df31bc2ccfd5becafb76e815d8;p=modules%2Fshaper.git diff --git a/src/Model/Model_AttributeSelectionList.cpp b/src/Model/Model_AttributeSelectionList.cpp index 7575ca2f9..9fb412407 100644 --- a/src/Model/Model_AttributeSelectionList.cpp +++ b/src/Model/Model_AttributeSelectionList.cpp @@ -110,8 +110,24 @@ void Model_AttributeSelectionList::append(const GeomPointPtr& thePoint, const st aNewAttr->setID(id()); mySize->Set(aNewTag); aNewAttr->selectSubShape(theType, thePoint); - if (selectionType().empty()) - setSelectionType(aNewAttr->value()->shapeTypeStr()); + owner()->data()->sendAttributeUpdated(this); +} + +void Model_AttributeSelectionList::append(const std::string& theType, + const std::string& theContextName, const int theIndex) +{ + int aNewTag = mySize->Get() + 1; + TDF_Label aNewLab = mySize->Label().FindChild(aNewTag); + + std::shared_ptr aNewAttr = + std::shared_ptr(new Model_AttributeSelection(aNewLab)); + if (owner()) { + aNewAttr->setObject(owner()); + aNewAttr->setParent(this); + } + aNewAttr->setID(id()); + mySize->Set(aNewTag); + aNewAttr->selectSubShape(theType, theContextName, theIndex); owner()->data()->sendAttributeUpdated(this); }