From f545455466022160a5dc0a7ed8baad028844335b Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 1 Jan 2015 21:05:19 +0100 Subject: [PATCH] + fixes #0001889: Crash when undoing move of base object of a part fillet --- src/Mod/Part/App/FeatureChamfer.cpp | 6 +++++- src/Mod/Part/App/FeatureCompound.cpp | 6 +++++- src/Mod/Part/App/FeatureFillet.cpp | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/Mod/Part/App/FeatureChamfer.cpp b/src/Mod/Part/App/FeatureChamfer.cpp index e857000b0dbe..f4ec4658d325 100644 --- a/src/Mod/Part/App/FeatureChamfer.cpp +++ b/src/Mod/Part/App/FeatureChamfer.cpp @@ -77,9 +77,13 @@ App::DocumentObjectExecReturn *Chamfer::execute(void) return new App::DocumentObjectExecReturn("Resulting shape is null"); ShapeHistory history = buildHistory(mkChamfer, TopAbs_FACE, shape, base->Shape.getValue()); this->Shape.setValue(shape); + + // make sure the 'PropertyShapeHistory' is not safed in undo/redo (#0001889) PropertyShapeHistory prop; - prop.setContainer(this); prop.setValue(history); + prop.setContainer(this); + prop.touch(); + return App::DocumentObject::StdReturn; } catch (Standard_Failure) { diff --git a/src/Mod/Part/App/FeatureCompound.cpp b/src/Mod/Part/App/FeatureCompound.cpp index 7715b5fb5f0e..3b58288f066e 100644 --- a/src/Mod/Part/App/FeatureCompound.cpp +++ b/src/Mod/Part/App/FeatureCompound.cpp @@ -86,9 +86,13 @@ App::DocumentObjectExecReturn *Compound::execute(void) } this->Shape.setValue(comp); + + // make sure the 'PropertyShapeHistory' is not safed in undo/redo (#0001889) PropertyShapeHistory prop; - prop.setContainer(this); prop.setValues(history); + prop.setContainer(this); + prop.touch(); + return App::DocumentObject::StdReturn; } catch (Standard_Failure) { diff --git a/src/Mod/Part/App/FeatureFillet.cpp b/src/Mod/Part/App/FeatureFillet.cpp index 550fcaf3ea3a..daff992c6a14 100644 --- a/src/Mod/Part/App/FeatureFillet.cpp +++ b/src/Mod/Part/App/FeatureFillet.cpp @@ -76,9 +76,13 @@ App::DocumentObjectExecReturn *Fillet::execute(void) return new App::DocumentObjectExecReturn("Resulting shape is null"); ShapeHistory history = buildHistory(mkFillet, TopAbs_FACE, shape, base->Shape.getValue()); this->Shape.setValue(shape); + + // make sure the 'PropertyShapeHistory' is not safed in undo/redo (#0001889) PropertyShapeHistory prop; - prop.setContainer(this); prop.setValue(history); + prop.setContainer(this); + prop.touch(); + return App::DocumentObject::StdReturn; } catch (Standard_Failure) {