From: mpv Date: Tue, 12 Dec 2017 11:37:51 +0000 (+0300) Subject: Keep also multiple modificators on the root shape of the body. X-Git-Tag: V_2.10.0RC~58 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=10188f6e049f86beb78e076a88d28c298c9812da;p=modules%2Fshaper.git Keep also multiple modificators on the root shape of the body. --- diff --git a/src/Model/Model_BodyBuilder.cpp b/src/Model/Model_BodyBuilder.cpp index 7807464e6..2adab6e8f 100755 --- a/src/Model/Model_BodyBuilder.cpp +++ b/src/Model/Model_BodyBuilder.cpp @@ -284,7 +284,8 @@ TNaming_Builder* Model_BodyBuilder::builder(const int theTag) std::map::iterator aFind = myBuilders.find(theTag); if (aFind == myBuilders.end()) { std::shared_ptr aData = std::dynamic_pointer_cast(data()); - myBuilders[theTag] = new TNaming_Builder(aData->shapeLab().FindChild(theTag)); + myBuilders[theTag] = new TNaming_Builder( + theTag == 0 ? aData->shapeLab() : aData->shapeLab().FindChild(theTag)); aFind = myBuilders.find(theTag); } return aFind->second; @@ -419,9 +420,9 @@ void Model_BodyBuilder::loadAndOrientModifiedShapes ( if(theIsStoreAsGenerated) { // Here we store shapes as generated, to avoid problem when one parent shape produce // several child shapes. In this case naming could not determine which shape to select. - builder(aBuilderTag)->Generated(aRoot,aNewShape); + builder(aBuilderTag)->Generated(aRoot, aNewShape); } else { - builder(aBuilderTag)->Modify(aRoot,aNewShape); + builder(aBuilderTag)->Modify(aRoot, aNewShape); } if(isBuilt) { if(theIsStoreSeparate) { @@ -443,6 +444,13 @@ void Model_BodyBuilder::loadAndOrientModifiedShapes ( if(theIsStoreSeparate) { aTag++; } + } else if (aResultShape->isSame(*anIt)) { + // keep the modification evolution on the root level (2241 - history propagation issue) + if(theIsStoreAsGenerated) { + builder(0)->Generated(aRoot, aNewShape); + } else { + builder(0)->Modify(aRoot, aNewShape); + } } } }