]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #1727 : naming name of the whole part processing
authormpv <mpv@opencascade.com>
Tue, 6 Sep 2016 09:11:16 +0000 (12:11 +0300)
committermpv <mpv@opencascade.com>
Tue, 6 Sep 2016 09:11:30 +0000 (12:11 +0300)
src/Model/Model_AttributeValidator.cpp
src/Model/Model_SelectionNaming.cpp

index 4750c29bb30f42b5a4a48e26ba4bd641a2367280..09207089b798b30f3d4a0806771f71bc3161bb86 100644 (file)
@@ -70,4 +70,3 @@ bool Model_AttributeValidator::isValid(const AttributePtr& theAttribute,
   }
   return true;
 }
-
index 2817bea492e7a4637dd88ef4c490a440c1f0b95e..3b2cfba3118ae7b6f3a1f4c1fd38ec3a394da9e1 100644 (file)
@@ -668,6 +668,7 @@ bool Model_SelectionNaming::selectSubShape(const std::string& theType,
   std::shared_ptr<Model_Document> 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<Model_Document>(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<Model_Document>(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;
+      }
     }
   }