Out of bounds warning
This commit is contained in:
parent
8d757e96be
commit
10ddcc51a2
3 changed files with 50 additions and 6 deletions
|
|
@ -286,3 +286,24 @@ const PointProbe GridPreview::probePoint(const QPoint &point)
|
|||
}
|
||||
return PointProbe();
|
||||
}
|
||||
|
||||
const QList<PointProbe> GridPreview::pointsOutOfBounds()
|
||||
{
|
||||
QList<PointProbe> out;
|
||||
|
||||
for (auto iter = lines.begin(); iter != lines.end(); iter++)
|
||||
{
|
||||
const QPoint &start = iter->getStart();
|
||||
const QPoint &end = iter->getEnd();
|
||||
|
||||
PointProbe startProbe = probePoint(start);
|
||||
PointProbe endProbe = probePoint(end);
|
||||
|
||||
if (!startProbe.inBounds)
|
||||
out.push_back(startProbe);
|
||||
if (!endProbe.inBounds)
|
||||
out.push_back(startProbe);
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue