From c0b6eaa935bceb5929e4d0bc1d2580c2b88f3977 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 8 Apr 2017 14:42:35 +0000 Subject: [PATCH] Fix automatic marking of constraints as reference. To reproduce: * New sketch; * Create two redundant constraints, with second being automatically marked as reference; * Switch one of these to non-reference; * Allow redundant constraints; * All new constraints with labels created as reference, even if that specific degree of freedom is not constrained yet. --- src/constraint.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/constraint.cpp b/src/constraint.cpp index b51cbaf..516b8b0 100644 --- a/src/constraint.cpp +++ b/src/constraint.cpp @@ -737,7 +737,8 @@ void Constraint::MenuConstrain(Command id) { if(SK.constraint.FindByIdNoOops(c.h)) { Constraint *constraint = SK.GetConstraint(c.h); if(SS.TestRankForGroup(c.group) == SolveResult::REDUNDANT_OKAY && - constraint->HasLabel()) { + !SK.GetGroup(SS.GW.activeGroup)->allowRedundant && + constraint->HasLabel()) { constraint->reference = true; } }