diff --git a/src/Mod/Sketcher/App/Sketch.cpp b/src/Mod/Sketcher/App/Sketch.cpp index 6951635bbb..ce4d8c3e0f 100644 --- a/src/Mod/Sketcher/App/Sketch.cpp +++ b/src/Mod/Sketcher/App/Sketch.cpp @@ -3185,6 +3185,11 @@ int Sketch::initMove(int geoId, PointPos pos, bool fine) return 0; } +void Sketch::resetInitMove() +{ + isInitMove = false; +} + int Sketch::movePoint(int geoId, PointPos pos, Base::Vector3d toPoint, bool relative) { geoId = checkGeoId(geoId); diff --git a/src/Mod/Sketcher/App/Sketch.h b/src/Mod/Sketcher/App/Sketch.h index 3d29c69dd7..59f7a1ec5b 100644 --- a/src/Mod/Sketcher/App/Sketch.h +++ b/src/Mod/Sketcher/App/Sketch.h @@ -104,6 +104,10 @@ public: * sketch status as a reference */ int initMove(int geoId, PointPos pos, bool fine=true); + + /** Resets the initialization of a point or curve drag + */ + void resetInitMove(); /** move this point (or curve) to a new location and solve. * This will introduce some additional weak constraints expressing diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 5dabd4fbe3..83f0b04348 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -202,10 +202,13 @@ int SketchObject::hasConflicts(void) const int SketchObject::solve(bool updateGeoAfterSolving/*=true*/) { + // Reset the initial movement in case of a dragging operation was ongoing on the solver. + solvedSketch.resetInitMove(); + // if updateGeoAfterSolving=false, the solver information is updated, but the Sketch is nothing // updated. It is useful to avoid triggering an OnChange when the goeometry did not change but // the solver needs to be updated. - + // We should have an updated Sketcher (sketchobject) geometry or this solve() should not have happened // therefore we update our sketch solver geometry with the SketchObject one. //