Reduce qDebug calls

This commit is contained in:
Atlante45 2015-06-09 15:26:41 +02:00
parent 3fb5e47dcc
commit 303026d86b

View file

@ -86,6 +86,7 @@ bool LineEntityItem::setProperties(const EntityItemProperties& properties) {
void LineEntityItem::setLinePoints(const QVector<glm::vec3>& points) { void LineEntityItem::setLinePoints(const QVector<glm::vec3>& points) {
QVector<glm::vec3> sanitizedPoints; QVector<glm::vec3> sanitizedPoints;
int invalidPoints = 0;
for (int i = 0; i < points.size(); i++) { for (int i = 0; i < points.size(); i++) {
glm::vec3 point = points.at(i); glm::vec3 point = points.at(i);
// Make sure all of our points are valid numbers. // Make sure all of our points are valid numbers.
@ -93,9 +94,12 @@ void LineEntityItem::setLinePoints(const QVector<glm::vec3>& points) {
if (point.x > 0 && point.y > 0 && point.z > 0){ if (point.x > 0 && point.y > 0 && point.z > 0){
sanitizedPoints << point; sanitizedPoints << point;
} else { } else {
qDebug() << "INVALID POINT"; ++invalidPoints;
} }
} }
if (invalidPoints > 0) {
qDebug() << "Line with" << invalidPoints << "INVALID POINTS";
}
_points = sanitizedPoints; _points = sanitizedPoints;
_pointsChanged = true; _pointsChanged = true;
} }