From 9bff63e38d66a78bf45b8dea4b112edd9b66863a Mon Sep 17 00:00:00 2001 From: tetektoza Date: Thu, 21 Aug 2025 23:49:40 +0200 Subject: [PATCH] Sketcher: Fix construction lines becoming solid after box selection Currently if user tries to use box selection while having transformed normal line to a construction line, the line becomes solid unless it gets moved or new geometry is created. The root cause of that is the `draw(true, false)` call which uses outdated solver geometry where construction=false is being specified. Solver updates lazily, which results in construction lines in normal sublayer instead of construction. So, this patch changes it to `draw(false, false)` after box selection. This ensures the redraw uses current SketchObject geometry with up-to-date construction flags. This should be safe, as box selection is purely visual and we do not need geometry calculations in this operation. --- src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index f0bc652424..81f7a243a9 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -1086,8 +1086,10 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe doBoxSelection(DoubleClick::prvCursorPos, cursorPos, viewer); rubberband->setWorking(false); + // use draw(false, false) to avoid solver geometry with outdated construction flags + draw(false, false); + // a redraw is required in order to clear the rubberband - draw(true, false); const_cast(viewer)->redraw(); setSketchMode(STATUS_NONE); return true;