diff --git a/src/Mod/Sketcher/App/Constraint.cpp b/src/Mod/Sketcher/App/Constraint.cpp index 24d0959f8..bf13188cb 100644 --- a/src/Mod/Sketcher/App/Constraint.cpp +++ b/src/Mod/Sketcher/App/Constraint.cpp @@ -131,19 +131,20 @@ void Constraint::Restore(XMLReader &reader) AlignmentType = (InternalAlignmentType) reader.getAttributeAsInteger("InternalAlignmentType"); else AlignmentType = Undef; - + // read the third geo group if present if (reader.hasAttribute("Third")) { Third = reader.getAttributeAsInteger("Third"); ThirdPos = (PointPos) reader.getAttributeAsInteger("ThirdPos"); } + // Read the distance a constraint label has been moved if (reader.hasAttribute("LabelDistance")) LabelDistance = (float)reader.getAttributeAsFloat("LabelDistance"); if (reader.hasAttribute("LabelPosition")) LabelPosition = (float)reader.getAttributeAsFloat("LabelPosition"); - + if (reader.hasAttribute("IsDriving")) - isDriving = (bool)reader.getAttributeAsInteger("IsDriving"); + isDriving = reader.getAttributeAsInteger("IsDriving") ? true : false; } diff --git a/src/Mod/Sketcher/Gui/CommandConstraints.cpp b/src/Mod/Sketcher/Gui/CommandConstraints.cpp index e25eec191..0a47ad5dd 100644 --- a/src/Mod/Sketcher/Gui/CommandConstraints.cpp +++ b/src/Mod/Sketcher/Gui/CommandConstraints.cpp @@ -3476,7 +3476,7 @@ void CmdSketcherToggleDrivingConstraint::activated(int iMsg) // issue the actual commands to toggle doCommand(Doc,"App.ActiveDocument.%s.toggleDriving(%d) ",selection[0].getFeatName(),ConstrId); } - catch(const Base::Exception& e) { + catch(const Base::Exception&) { succesful--; } }