[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.
This commit is contained in:
Neinei0k
2020-10-03 13:07:06 +03:00
committed by abdullahtahiriyo
parent 4134315434
commit 90f2314b1e

View File

@@ -1736,7 +1736,7 @@ std::set<int> 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());