From b4851a1e1f8724e806dbe798accd7e418cb7acda Mon Sep 17 00:00:00 2001 From: Miguel Fernandez Date: Sun, 4 Feb 2024 16:54:05 -0700 Subject: [PATCH] Removed unnecessary variable --- src/drawconstraint.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/drawconstraint.cpp b/src/drawconstraint.cpp index cccde5a3..78131c3e 100644 --- a/src/drawconstraint.cpp +++ b/src/drawconstraint.cpp @@ -449,16 +449,15 @@ void Constraint::DoArcForAngle(Canvas *canvas, Canvas::hStroke hcs, } bool Constraint::IsVisible() const { - bool evalShowCustomComment = false; + bool keep = false; if(SS.GW.showConstraints == GraphicsWindow::ShowConstraintMode::SCM_NOSHOW){ if (type == Type::COMMENT && disp.style.v >= Style::FIRST_CUSTOM) { - evalShowCustomComment = true; + keep = true; } else { return false; } } - bool isDim = false; if(SS.GW.showConstraints == GraphicsWindow::ShowConstraintMode::SCM_SHOW_DIM) switch(type) { case ConstraintBase::Type::ANGLE: @@ -466,12 +465,11 @@ bool Constraint::IsVisible() const { case ConstraintBase::Type::PT_PT_DISTANCE: case ConstraintBase::Type::PT_FACE_DISTANCE: case ConstraintBase::Type::PT_LINE_DISTANCE: - case ConstraintBase::Type::PT_PLANE_DISTANCE: isDim = true; break; + case ConstraintBase::Type::PT_PLANE_DISTANCE: keep = true; break; default:; } - if(SS.GW.showConstraints == GraphicsWindow::ShowConstraintMode::SCM_SHOW_ALL || - isDim || evalShowCustomComment) { + if(SS.GW.showConstraints == GraphicsWindow::ShowConstraintMode::SCM_SHOW_ALL || keep) { Group *g = SK.GetGroup(group); // If the group is hidden, then the constraints are hidden and not // able to be selected.