Skip to content

Commit

Permalink
Sketcher Bug fix: Python function clear() contains wrong code
Browse files Browse the repository at this point in the history
=============================================================

This function is like this from 2011 according to git blame.

The original code makes no sense. I assume that what is intended in this
function (in accordance with SketchPy.xml) is call the method clear in
Sketch.cpp.
  • Loading branch information
abdullahtahiriyo authored and wwmayer committed May 26, 2015
1 parent b882109 commit b5ff8cd
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Mod/Sketcher/App/SketchPyImp.cpp
Expand Up @@ -141,11 +141,9 @@ PyObject* SketchPy::addConstraint(PyObject *args)

PyObject* SketchPy::clear(PyObject *args)
{
int index;
if (!PyArg_ParseTuple(args, "i", &index))
return 0;

return Py::new_reference_to(Py::Int(getSketchPtr()->addVerticalConstraint(index)));
getSketchPtr()->clear();

Py_RETURN_NONE;
}

PyObject* SketchPy::movePoint(PyObject *args)
Expand Down

0 comments on commit b5ff8cd

Please sign in to comment.