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.
pull/238/head
whitequark 2017-04-08 14:42:35 +00:00
parent 43dc16262a
commit c0b6eaa935
1 changed files with 2 additions and 1 deletions

View File

@ -737,6 +737,7 @@ 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 &&
!SK.GetGroup(SS.GW.activeGroup)->allowRedundant &&
constraint->HasLabel()) {
constraint->reference = true;
}