From: mpv Date: Tue, 6 Sep 2016 09:11:16 +0000 (+0300) Subject: Fix for the issue #1727 : naming name of the whole part processing X-Git-Tag: V_2.5.0~50 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=defb242def567f132ff30734ca156d92eadffe66;p=modules%2Fshaper.git Fix for the issue #1727 : naming name of the whole part processing --- diff --git a/src/Model/Model_AttributeValidator.cpp b/src/Model/Model_AttributeValidator.cpp index 4750c29bb..09207089b 100644 --- a/src/Model/Model_AttributeValidator.cpp +++ b/src/Model/Model_AttributeValidator.cpp @@ -70,4 +70,3 @@ bool Model_AttributeValidator::isValid(const AttributePtr& theAttribute, } return true; } - diff --git a/src/Model/Model_SelectionNaming.cpp b/src/Model/Model_SelectionNaming.cpp index 2817bea49..3b2cfba31 100644 --- a/src/Model/Model_SelectionNaming.cpp +++ b/src/Model/Model_SelectionNaming.cpp @@ -668,6 +668,7 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType, std::shared_ptr aDoc = theDoc; if (aSlash != std::string::npos) { std::string aDocName = theSubShapeName.substr(0, aSlash); + ResultPartPtr aFoundPart; DocumentPtr aRootDoc = ModelAPI_Session::get()->moduleDocument(); if (aDocName == aRootDoc->kind()) { aDoc = std::dynamic_pointer_cast(aRootDoc); @@ -677,11 +678,17 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType, aRootDoc->object(ModelAPI_ResultPart::group(), a)); if (aPart.get() && aPart->isActivated() && aPart->data()->name() == aDocName) { aDoc = std::dynamic_pointer_cast(aPart->partDoc()); + aFoundPart = aPart; + break; } } } if (aDoc != theDoc) { // so, the first word is the document name => reduce the string for the next manips aSubShapeName = theSubShapeName.substr(aSlash + 1); + if (aSubShapeName.empty() && aFoundPart.get()) { // the whole Part result + theCont = aFoundPart; + return true; + } } }