Sketcher: fix missing update on expression change
This commit is contained in:
@@ -89,6 +89,7 @@
|
||||
using namespace Sketcher;
|
||||
using namespace Base;
|
||||
|
||||
FC_LOG_LEVEL_INIT("Sketch",true,true);
|
||||
|
||||
const int GeoEnum::RtPnt = -1;
|
||||
const int GeoEnum::HAxis = -1;
|
||||
@@ -6861,8 +6862,19 @@ void SketchObject::setExpression(const App::ObjectIdentifier &path, boost::share
|
||||
{
|
||||
DocumentObject::setExpression(path, expr);
|
||||
|
||||
if(noRecomputes) // if we do not have a recompute, the sketch must be solved to update the DoF of the solver, constraints and UI
|
||||
if(noRecomputes) {// if we do not have a recompute, the sketch must be solved to update the DoF of the solver, constraints and UI
|
||||
try {
|
||||
auto res = ExpressionEngine.execute();
|
||||
if(res) {
|
||||
FC_ERR("Failed to recompute " << ExpressionEngine.getFullName() << ": " << res->Why);
|
||||
delete res;
|
||||
}
|
||||
} catch (Base::Exception &e) {
|
||||
e.ReportException();
|
||||
FC_ERR("Failed to recompute " << ExpressionEngine.getFullName() << ": " << e.what());
|
||||
}
|
||||
solve();
|
||||
}
|
||||
}
|
||||
|
||||
int SketchObject::autoConstraint(double precision, double angleprecision, bool includeconstruction)
|
||||
|
||||
Reference in New Issue
Block a user