Method CheckLoops return wrong list of points if points less then 4.
--HG-- branch : release
This commit is contained in:
parent
46721106a8
commit
1cb0ec98a7
|
@ -234,12 +234,12 @@ QPainterPath VEquidistant::Equidistant(QVector<QPointF> points, const Equidistan
|
||||||
QVector<QPointF> ekvPoints;
|
QVector<QPointF> ekvPoints;
|
||||||
if ( points.size() < 3 )
|
if ( points.size() < 3 )
|
||||||
{
|
{
|
||||||
qDebug()<<"Not enough points for building the equidistant.\n";
|
qDebug()<<"Not enough points for building the equidistant.";
|
||||||
return ekv;
|
return ekv;
|
||||||
}
|
}
|
||||||
if (width <= 0)
|
if (width <= 0)
|
||||||
{
|
{
|
||||||
qDebug()<<"Width <= 0.\n";
|
qDebug()<<"Width <= 0.";
|
||||||
return ekv;
|
return ekv;
|
||||||
}
|
}
|
||||||
for (qint32 i = 0; i < points.size(); ++i )
|
for (qint32 i = 0; i < points.size(); ++i )
|
||||||
|
@ -306,7 +306,8 @@ QVector<QPointF> VEquidistant::CheckLoops(const QVector<QPointF> &points)
|
||||||
/*If we got less than 4 points no need seek loops.*/
|
/*If we got less than 4 points no need seek loops.*/
|
||||||
if (points.size() < 4)
|
if (points.size() < 4)
|
||||||
{
|
{
|
||||||
return ekvPoints;
|
qDebug()<<"Less then 4 points. Doesn't need check for loops.";
|
||||||
|
return points;
|
||||||
}
|
}
|
||||||
bool closed = false;
|
bool closed = false;
|
||||||
if (points.at(0) == points.at(points.size()-1))
|
if (points.at(0) == points.at(points.size()-1))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user