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.
This commit is contained in:
@@ -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<Gui::View3DInventorViewer*>(viewer)->redraw();
|
||||
setSketchMode(STATUS_NONE);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user