fix crash in polyline tool

This commit is contained in:
wmayer
2019-09-15 11:03:21 +02:00
parent a374ecc8ef
commit 4631b26d42
2 changed files with 3 additions and 3 deletions

View File

@@ -3639,7 +3639,7 @@ void CmdSketcherConstrainParallel::applyConstraint(std::vector<SelIdPair> &selSe
// undo command open
openCommand("add parallel constraint");
FCMD_OBJ_CMD2(".addConstraint(Sketcher.Constraint('Parallel',%d,%d)) ",
FCMD_OBJ_CMD2("addConstraint(Sketcher.Constraint('Parallel',%d,%d)) ",
sketchgui->getObject(), GeoId1, GeoId2);
// finish the transaction and update
commitCommand();

View File

@@ -1156,7 +1156,7 @@ public:
// #3974: if in radians, the printf %f defaults to six decimals, which leads to loss of precision
double arcAngle = abs(round( (endAngle - startAngle) / (M_PI/4)) * 45); // in degrees
FCMD_OBJ_CMD2("App.ActiveDocument.%s.addConstraint(Sketcher.Constraint('Angle',%i,App.Units.Quantity('%f deg'))) ",
FCMD_OBJ_CMD2("addConstraint(Sketcher.Constraint('Angle',%i,App.Units.Quantity('%f deg'))) ",
sketchgui->getObject(),
lastCurve, arcAngle);
}
@@ -6334,7 +6334,7 @@ public:
FCMD_OBJ_CMD2("extend(%d, %f, %d)\n", // GeoId, increment, PointPos
sketchgui->getObject(), BaseGeoId, Increment,
ExtendFromStart ? Sketcher::start : Sketcher::end);
Gui::Command::commitCommand();
Gui::Command::commitCommand();
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher");
bool autoRecompute = hGrp->GetBool("AutoRecompute",false);