From: mpv Date: Fri, 26 Feb 2016 15:01:26 +0000 (+0300) Subject: Issue #1330: implementation of isInList for AttributeSelectionList X-Git-Tag: V_2.2.0~56 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c85e575c64b3d05baaa5c3a3b6a4bd296f64234a;p=modules%2Fshaper.git Issue #1330: implementation of isInList for AttributeSelectionList --- diff --git a/src/Model/Model_AttributeSelectionList.cpp b/src/Model/Model_AttributeSelectionList.cpp index a049b9123..b3c39a76d 100644 --- a/src/Model/Model_AttributeSelectionList.cpp +++ b/src/Model/Model_AttributeSelectionList.cpp @@ -145,6 +145,11 @@ bool Model_AttributeSelectionList::isInList(const ResultPtr& theContext, const std::shared_ptr& theSubShape, const bool theTemporarily) { + for(int anIndex = size() - 1; anIndex >= 0; anIndex--) { + AttributeSelectionPtr anAttr = value(anIndex); + if (anAttr->context() == theContext && anAttr->value()->isEqual(theSubShape)) + return true; + } return false; }