From c85e575c64b3d05baaa5c3a3b6a4bd296f64234a Mon Sep 17 00:00:00 2001 From: mpv Date: Fri, 26 Feb 2016 18:01:26 +0300 Subject: [PATCH] Issue #1330: implementation of isInList for AttributeSelectionList --- src/Model/Model_AttributeSelectionList.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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; } -- 2.39.2