From 90f2314b1e67b800ce6b9ad2dd31cfac00e7c00f Mon Sep 17 00:00:00 2001 From: Neinei0k Date: Sat, 3 Oct 2020 13:07:06 +0300 Subject: [PATCH] [Sketcher] Fix merged constraint preselection bug Constraint icons that located close to each other get merged into a single icon. If you zoom in, individual constraints on these icons can't be selected anymore because their relative positions, which must depend on the zoom, don't change. The problem is solved by multiplying relative position by the scale factor which depends on the magnification. --- src/Mod/Sketcher/Gui/ViewProviderSketch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 5572a79a0d..38aaea14e7 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -1736,7 +1736,7 @@ std::set ViewProviderSketch::detectPreselectionConstr(const SoPickedPoint * SbViewVolume vol = pCam->getViewVolume(); - getCoordsOnSketchPlane(x,y,absPos+trans,vol.getProjectionDirection()); + getCoordsOnSketchPlane(x,y,absPos+trans*getScaleFactor(),vol.getProjectionDirection()); Gui::ViewVolumeProjection proj(viewer->getSoRenderManager()->getCamera()->getViewVolume());