From b53859554a0afb7a89afa2cac4d37195012b0d24 Mon Sep 17 00:00:00 2001 From: mpv Date: Mon, 22 Oct 2018 17:39:06 +0300 Subject: [PATCH] Fix the crashes on new modification history storage, reproducable on Bug2569_shaper9.1.0_20180928_geom.py --- src/FeaturesPlugin/FeaturesPlugin_Rotation.cpp | 1 + src/GeomAlgoAPI/GeomAlgoAPI_MakeShapeCustom.cpp | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) 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); } -- 2.39.2