X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_AttributeSelectionList.cpp;h=5207a112024deb535b0e860b5e072f7b7dea05e5;hb=cb2bfff600626039e210f08de27b5229541d367a;hp=e091a6e9e6fa09505864ebea062e9e3bc702d11e;hpb=7074394f8f08413d885f63be01df6bd5007b868c;p=modules%2Fshaper.git diff --git a/src/Model/Model_AttributeSelectionList.cpp b/src/Model/Model_AttributeSelectionList.cpp index e091a6e9e..5207a1120 100644 --- a/src/Model/Model_AttributeSelectionList.cpp +++ b/src/Model/Model_AttributeSelectionList.cpp @@ -237,7 +237,7 @@ bool Model_AttributeSelectionList::isInList(const ResultPtr& theContext, std::list >::iterator aShapes = aContext->second.begin(); for(; aShapes != aContext->second.end(); aShapes++) { if (!theSubShape.get()) { - if (!aShapes->get()) + if (!aShapes->get() || (*aShapes)->isSame(aContext->first->shape())) return true; } else { // we need to call here isSame instead of isEqual to do not check shapes orientation @@ -254,13 +254,13 @@ bool Model_AttributeSelectionList::isInList(const ResultPtr& theContext, if (anAttr.get()) { if (anAttr->context() == theContext) { // contexts are equal, so, check that values are also std::shared_ptr aValue = anAttr->value(); - if (!aValue.get()) { - if (!theSubShape.get()) { // both are null + if (!theSubShape.get()) { + if (!aValue.get() || aValue->isSame(theContext->shape())) { // both are null return true; } } else { // we need to call here isSame instead of isEqual to do not check shapes orientation - if (aValue->isSame(theSubShape)) // shapes are equal + if (theSubShape->isSame(aValue)) // shapes are equal return true; } }