From cbbbe942eac73163365d9698985bf57e4515a63e Mon Sep 17 00:00:00 2001 From: David Osterberg Date: Tue, 22 Dec 2020 18:05:06 +0100 Subject: [PATCH] Apply style suggestions from @abdullahtahiriyo --- src/Mod/Sketcher/App/SketchObject.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 2d1eb377dc..21e3365b13 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -3418,14 +3418,14 @@ int SketchObject::addSymmetric(const std::vector &geoIdList, int refGeoId, // Find out if reference is aligned with V or H axis, // if so we can keep Vertical and Horizontal constrants in the mirrored geometry. bool refIsAxisAligned = false; - if (refGeoId == Sketcher::GeoEnum::VAxis || refGeoId == Sketcher::GeoEnum::HAxis) + if (refGeoId == Sketcher::GeoEnum::VAxis || refGeoId == Sketcher::GeoEnum::HAxis) { refIsAxisAligned = true; - for (std::vector::const_iterator it = constrvals.begin(); it != constrvals.end(); ++it) { - Constraint *constr = *(it); - if (constr->First != refGeoId) - continue; - if (constr->Type == Sketcher::Vertical || constr->Type == Sketcher::Horizontal) - refIsAxisAligned = true; + } else { + for (std::vector::const_iterator it = constrvals.begin(); it != constrvals.end(); ++it) { + Constraint *constr = *(it); + if (constr->First == refGeoId && (constr->Type == Sketcher::Vertical || constr->Type == Sketcher::Horizontal)) + refIsAxisAligned = true; + } } // reference is a line