improve whitespaces

This commit is contained in:
wmayer
2018-01-13 14:07:15 +01:00
parent e1bf2045dd
commit adaf9323f3

View File

@@ -483,29 +483,26 @@ PyObject* SketchObjectPy::delConstraintOnPoint(PyObject *args)
if (!PyArg_ParseTuple(args, "i|i", &Index, &pos))
return 0;
if(pos>=0 && pos<3) { // Sketcher::none Sketcher::mid
if (this->getSketchObjectPtr()->delConstraintOnPoint(Index,(Sketcher::PointPos)pos)) {
std::stringstream str;
str << "Not able to delete a constraint on point with the given index: " << Index;
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
if (pos>=0 && pos<3) { // Sketcher::none Sketcher::mid
if (this->getSketchObjectPtr()->delConstraintOnPoint(Index,(Sketcher::PointPos)pos)) {
std::stringstream str;
str << "Not able to delete a constraint on point with the given index: " << Index
<< " and position: " << pos;
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
}
else if (pos==-1) {
if (this->getSketchObjectPtr()->delConstraintOnPoint(Index)) {
std::stringstream str;
str << "Not able to delete a constraint on point with the given index: " << Index;
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
if (this->getSketchObjectPtr()->delConstraintOnPoint(Index)) {
std::stringstream str;
str << "Not able to delete a constraint on point with the given index: " << Index;
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
}
}
else {
std::stringstream str;
str << "Wrong PointPos argument";
PyErr_SetString(PyExc_ValueError, str.str().c_str());
return 0;
PyErr_SetString(PyExc_ValueError, "Wrong PointPos argument");
return 0;
}
Py_Return;