From 314227ead78aac566f1607e396da4ff3b966dadf Mon Sep 17 00:00:00 2001 From: Jonathan Westhues Date: Sun, 14 Jun 2009 14:17:03 -0800 Subject: [PATCH] Don't count point-coincident constraints towards the limit (when the software is unlicensed), and change the limit to 25. [git-p4: depot-paths = "//depot/solvespace/": change = 1985] --- constraint.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/constraint.cpp b/constraint.cpp index e6cdadc..110baab 100644 --- a/constraint.cpp +++ b/constraint.cpp @@ -103,10 +103,15 @@ void Constraint::ConstrainCoincident(hEntity ptA, hEntity ptB) { } void Constraint::MenuConstrain(int id) { - if(SK.constraint.n > 30) { + int nt = 0; + Constraint *ct; + for(ct = SK.constraint.First(); ct; ct = SK.constraint.NextAfter(ct)) { + if(ct->type != POINTS_COINCIDENT) nt++; + } + if(nt > 25) { if((!SS.license.licensed) && SS.license.trialDaysRemaining <= 0) { Error("The 90-day trial of SolveSpace has expired, and the light " - "version does not support more than 30 constraints in a " + "version does not support more than 25 constraints in a " "single file.\r\n\r\n" "Choose Help -> Website / Manual to purchase a license."); return;