From a32aff3cdab3f9b8f8e3241f1e4dd043aabca238 Mon Sep 17 00:00:00 2001 From: PaddleStroke Date: Thu, 29 Aug 2024 12:49:07 +0200 Subject: [PATCH] Sketcher: Fix problem where preselectAtPoint was called after the autoconstraints being generated, hence having no effect. By adding updateDataAndDrawToPosition after we regenerate the correct autoconstraint. We cannot just move the mouseMove to after preselectAtPoint because we need to have the enforced position. --- src/Mod/Sketcher/Gui/DrawSketchController.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Mod/Sketcher/Gui/DrawSketchController.h b/src/Mod/Sketcher/Gui/DrawSketchController.h index 5d26a03069..714a6bda87 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchController.h +++ b/src/Mod/Sketcher/Gui/DrawSketchController.h @@ -565,6 +565,9 @@ protected: auto currentstate = handler->state(); // ensure that object at point is preselected, so that autoconstraints are generated handler->preselectAtPoint(lastControlEnforcedPosition); + // We have to redo an update to regenerate the correct autoconstraints after the + // preselectAtPoint. + handler->updateDataAndDrawToPosition(lastControlEnforcedPosition); doChangeDrawSketchHandlerMode();