Page MenuHomePhabricator

PlanarFigureInteractor::SetPreviewPointPosition works incorrectly
Closed, ResolvedPublic

Description

There is a bug in PlanarFigureInteractor::SetPreviewPointPosition, line 427:
renderer->GetDisplayGeometry()->DisplayToWorld( pointProjectedOntoLine, pointProjectedOntoLine );

The variable pointProjectedOntoLine is basically not initialized and this leads to the preview control point being at 0 coordinates and if the user clicks - the new point is created there as well.
One quick fix to this is to replace this line with
renderer->GetDisplayGeometry()->DisplayToWorld( positionEvent->GetPointerPositionOnScreen(), pointProjectedOntoLine );

Event Timeline

khlebnikov added a subscriber: khlebnikov.

This bug is present in the current master branch.

Bug is fixed in the current release