From bfae7071b1fb0040ffbc4e80d06ac8bb65b6c499 Mon Sep 17 00:00:00 2001 From: azv Date: Fri, 1 Nov 2019 15:54:42 +0300 Subject: [PATCH] Fix the error while initializing the sketch by the external plane. --- src/SketchPlugin/SketchPlugin_Sketch.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SketchPlugin/SketchPlugin_Sketch.cpp b/src/SketchPlugin/SketchPlugin_Sketch.cpp index 9c247446c..9bc3c43bf 100644 --- a/src/SketchPlugin/SketchPlugin_Sketch.cpp +++ b/src/SketchPlugin/SketchPlugin_Sketch.cpp @@ -315,6 +315,7 @@ void SketchPlugin_Sketch::attributeChanged(const std::string& theID) { std::shared_ptr aYDir(new GeomAPI_Dir(aNormDir->cross(aTempDir))); std::shared_ptr aXDir(new GeomAPI_Dir(aYDir->cross(aNormDir))); + bool aWasBlocked = data()->blockSendAttributeUpdated(true); // update position of the sketch std::shared_ptr anOrigin = std::dynamic_pointer_cast (data()->attribute(SketchPlugin_Sketch::ORIGIN_ID())); @@ -326,6 +327,8 @@ void SketchPlugin_Sketch::attributeChanged(const std::string& theID) { data()->attribute(SketchPlugin_Sketch::DIRX_ID())); aDirX->setValue(aXDir); std::shared_ptr aDir = aPlane->direction(); + if (aWasBlocked) + data()->blockSendAttributeUpdated(false); } } } -- 2.39.2