From: mpv Date: Wed, 26 Jul 2017 08:11:59 +0000 (+0300) Subject: Fix for the issue #2234 : don't put modification/generation shapes if there is no... X-Git-Tag: V_2.7.2~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f9807be75fb0d22b17ad84597eada6389548da0f;p=modules%2Fshaper.git Fix for the issue #2234 : don't put modification/generation shapes if there is no old shape presented in the document, so, useless, making naming go in wrong direction. --- diff --git a/src/Model/Model_BodyBuilder.cpp b/src/Model/Model_BodyBuilder.cpp index 9c143aef8..c9384e4e0 100755 --- a/src/Model/Model_BodyBuilder.cpp +++ b/src/Model/Model_BodyBuilder.cpp @@ -373,6 +373,8 @@ void Model_BodyBuilder::loadAndOrientModifiedShapes ( for (; aShapeExplorer.More(); aShapeExplorer.Next ()) { const TopoDS_Shape& aRoot = aShapeExplorer.Current (); if (!aView.Add(aRoot)) continue; + if (TNaming_Tool::NamedShape(aRoot, builder(theTag)->NamedShape()->Label()).IsNull()) + continue; // there is no sence to write history is old shape does not persented in document ListOfShape aList; std::shared_ptr aRShape(new GeomAPI_Shape()); aRShape->setImpl((new TopoDS_Shape(aRoot))); @@ -427,6 +429,8 @@ void Model_BodyBuilder::loadAndOrientGeneratedShapes ( for (; aShapeExplorer.More(); aShapeExplorer.Next ()) { const TopoDS_Shape& aRoot = aShapeExplorer.Current (); if (!aView.Add(aRoot)) continue; + if (TNaming_Tool::NamedShape(aRoot, builder(theTag)->NamedShape()->Label()).IsNull()) + continue; // there is no sence to write history is old shape does not persented in document ListOfShape aList; std::shared_ptr aRShape(new GeomAPI_Shape()); aRShape->setImpl((new TopoDS_Shape(aRoot)));