From: mpv Date: Mon, 22 Oct 2018 14:39:06 +0000 (+0300) Subject: Fix the crashes on new modification history storage, reproducable on Bug2569_shaper9... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=61c9f7ab4194026451676bc6a80d97df6a13d94c;p=modules%2Fshaper.git Fix the crashes on new modification history storage, reproducable on Bug2569_shaper9.1.0_20180928_geom.py --- diff --git a/src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp b/src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp index d87346d1a..f9a11c5c6 100755 --- a/src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp @@ -163,6 +163,7 @@ void FeaturesPlugin_Rotation::performTranslationByAxisAndAngle() } ResultBodyPtr aResultBody = document()->createBody(data(), aResultIndex); + aResultBody->storeModified(aBaseShape, aRotationAlgo->shape()); FeaturesPlugin_Tools::loadModifiedShapes(aResultBody, aBaseShape, aRotationAlgo, "Rotated"); setResult(aResultBody, aResultIndex); } diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_MakeShapeCustom.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_MakeShapeCustom.cpp index 81f16868e..01bf7c865 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_MakeShapeCustom.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_MakeShapeCustom.cpp @@ -22,7 +22,8 @@ //================================================================================================== GeomAlgoAPI_MakeShapeCustom::GeomAlgoAPI_MakeShapeCustom() -{} +{ +} //================================================================================================== void GeomAlgoAPI_MakeShapeCustom::setResult(const GeomShapePtr theShape) @@ -36,7 +37,6 @@ bool GeomAlgoAPI_MakeShapeCustom::addModified(const GeomShapePtr theOldShape, { if (!isValidForHistory(theNewShape)) return false; GeomShapePtr aNewShape = theNewShape; - fixOrientation(aNewShape); return myModified.add(theOldShape, aNewShape); } @@ -46,7 +46,6 @@ bool GeomAlgoAPI_MakeShapeCustom::addGenerated(const GeomShapePtr theOldShape, { if (!isValidForHistory(theNewShape)) return false; GeomShapePtr aNewShape = theNewShape; - fixOrientation(aNewShape); return myGenerated.add(theOldShape, aNewShape); }