Salome HOME
Fix the error while initializing the sketch by the external plane.
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Sketch.cpp
index 9c247446cfeeebb6d666134c7616727e45c15c1f..9bc3c43bfc11955bb89a3e3d8a2ae5f20794c4d7 100644 (file)
@@ -315,6 +315,7 @@ void SketchPlugin_Sketch::attributeChanged(const std::string& theID) {
           std::shared_ptr<GeomAPI_Dir> aYDir(new GeomAPI_Dir(aNormDir->cross(aTempDir)));
           std::shared_ptr<GeomAPI_Dir> aXDir(new GeomAPI_Dir(aYDir->cross(aNormDir)));
 
+          bool aWasBlocked = data()->blockSendAttributeUpdated(true);
           // update position of the sketch
           std::shared_ptr<GeomDataAPI_Point> anOrigin = std::dynamic_pointer_cast
             <GeomDataAPI_Point>(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<GeomAPI_Dir> aDir = aPlane->direction();
+          if (aWasBlocked)
+            data()->blockSendAttributeUpdated(false);
         }
       }
     }