From 8dad5e3bbbcb13d1a59ece300c764b8a6e4fea8c Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 4 Oct 2018 15:12:28 +0300 Subject: [PATCH] Fix for the issue #2674 : Fatal error when undo remove part --- src/Model/Model_Objects.cpp | 2 +- src/Model/Model_ResultConstruction.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Model/Model_Objects.cpp b/src/Model/Model_Objects.cpp index 505a8a812..35d3eaf1d 100644 --- a/src/Model/Model_Objects.cpp +++ b/src/Model/Model_Objects.cpp @@ -364,7 +364,7 @@ void Model_Objects::eraseAllFeatures() } kCreator->sendDeleted(myDoc, ModelAPI_Feature::group()); myFeatures.Clear(); // just remove features without modification of DS - updateHistory(ModelAPI_Feature::group()); + myHistory.clear(); } void Model_Objects::moveFeature(FeaturePtr theMoved, FeaturePtr theAfterThis) diff --git a/src/Model/Model_ResultConstruction.cpp b/src/Model/Model_ResultConstruction.cpp index 432f56b13..9b2520a45 100644 --- a/src/Model/Model_ResultConstruction.cpp +++ b/src/Model/Model_ResultConstruction.cpp @@ -500,7 +500,8 @@ int Model_ResultConstruction::select(const std::shared_ptr& theSu TopAbs_ShapeEnum aShapeType = aSubShape.ShapeType(); TDataStd_Integer::Set(aLab, (int)aShapeType); gp_Pnt aVertexPos; - TColStd_MapOfTransient allCurves; // curves of the sketc hsub-elements are used, so, edges are not equal + // curves of the sketch sub-elements are used, so, edges are not equal + TColStd_MapOfTransient allCurves; if (aShapeType == TopAbs_VERTEX) { // compare positions aVertexPos = BRep_Tool::Pnt(TopoDS::Vertex(aSubShape)); } else { -- 2.39.2