Sketcher: Fix reverting of geometry on undoing a new constraint

This commit is contained in:
logari81
2012-12-08 23:45:21 +01:00
parent d838f44e3c
commit db901921db
3 changed files with 30 additions and 21 deletions

View File

@@ -107,7 +107,9 @@ PyObject* SketchObjectPy::addConstraint(PyObject *args)
if (PyObject_TypeCheck(pcObj, &(Sketcher::ConstraintPy::Type))) {
Sketcher::Constraint *constr = static_cast<Sketcher::ConstraintPy*>(pcObj)->getConstraintPtr();
return Py::new_reference_to(Py::Int(this->getSketchObjectPtr()->addConstraint(constr)));
int ret = this->getSketchObjectPtr()->addConstraint(constr);
this->getSketchObjectPtr()->solve();
return Py::new_reference_to(Py::Int(ret));
}
Py_Return;
}