From a12f700aa27792f0ecdf09c5ee190d0bf88b0e81 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 30 May 2015 20:59:25 +0200 Subject: [PATCH] + fix some warnings --- src/Mod/Sketcher/App/Constraint.cpp | 7 ++++--- src/Mod/Sketcher/Gui/CommandConstraints.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) 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--; } }