[TD] Prevent crash when snapping leader line

This commit is contained in:
0penBrain
2022-01-27 18:19:09 +01:00
committed by WandererFan
parent 8419d53392
commit 420d54340a

View File

@@ -199,6 +199,9 @@ void QGTracker::sleep(bool b)
QPointF QGTracker::snapToAngle(QPointF dumbPt)
{
// If no point selected yet, snapping has no sense
if (m_points.size() < 1) return dumbPt;
QPointF result(dumbPt);
double angleIncr = M_PI / 8.0; //15*
//mirror last clicked point and event point to get sensible coords