From 1a593961961924e33832660e98d7319c08a9cc41 Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 2 Jan 2015 13:00:20 +0200 Subject: [PATCH] Method CheckLoops return wrong list of points if points less then 4. --HG-- branch : develop --- src/app/geometry/vequidistant.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/geometry/vequidistant.cpp b/src/app/geometry/vequidistant.cpp index 16ed9a8aa..6593e54dd 100644 --- a/src/app/geometry/vequidistant.cpp +++ b/src/app/geometry/vequidistant.cpp @@ -234,12 +234,12 @@ QPainterPath VEquidistant::Equidistant(QVector points, const Equidistan QVector ekvPoints; if ( points.size() < 3 ) { - qDebug()<<"Not enough points for building the equidistant.\n"; + qDebug()<<"Not enough points for building the equidistant."; return ekv; } if (width <= 0) { - qDebug()<<"Width <= 0.\n"; + qDebug()<<"Width <= 0."; return ekv; } for (qint32 i = 0; i < points.size(); ++i ) @@ -306,7 +306,8 @@ QVector VEquidistant::CheckLoops(const QVector &points) /*If we got less than 4 points no need seek loops.*/ if (points.size() < 4) { - return ekvPoints; + qDebug()<<"Less then 4 points. Doesn't need check for loops."; + return points; } bool closed = false; if (points.at(0) == points.at(points.size()-1))