Removed unnecessary variable

pull/1445/head
Miguel Fernandez 2024-02-04 16:54:05 -07:00
parent 04ada59357
commit b4851a1e1f
1 changed files with 4 additions and 6 deletions

View File

@ -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.