From defb242def567f132ff30734ca156d92eadffe66 Mon Sep 17 00:00:00 2001 From: mpv Date: Tue, 6 Sep 2016 12:11:16 +0300 Subject: [PATCH] Fix for the issue #1727 : naming name of the whole part processing --- src/Model/Model_AttributeValidator.cpp | 1 - src/Model/Model_SelectionNaming.cpp | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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; + } } } -- 2.39.2