X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_AttributeSelectionList.cpp;h=9fb4124075eac962de1a6d8b15a7770541194003;hb=caa2ac92b289e88592286da703c871dd58147b88;hp=c7e852221b97f19e24806334046fffb993baa8b5;hpb=2465abb942021bbf188e82397f01a3ad755ab1a6;p=modules%2Fshaper.git diff --git a/src/Model/Model_AttributeSelectionList.cpp b/src/Model/Model_AttributeSelectionList.cpp index c7e852221..9fb412407 100644 --- a/src/Model/Model_AttributeSelectionList.cpp +++ b/src/Model/Model_AttributeSelectionList.cpp @@ -113,6 +113,24 @@ void Model_AttributeSelectionList::append(const GeomPointPtr& thePoint, const st 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); +} + void Model_AttributeSelectionList::removeTemporaryValues() { if (myTmpAttr.get()) {