New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Variables calculations overwritten #906
Comments
Isn't this logical behaviour? By inserting the formula "#LegTaperOffset=6", the program will execute the formula #LegTaperOffset2=#LegTaperOffset=6, which is a double assignment that changes both #LegTaperOffset and #LegTaperOffset2, both to the value 6. |
No. Don't assume anything. The math parser allows for conditional expressions... meaning you should be able to set a variable based on a condition. Removing the use of = breaks this functionality, and most likely some existing patterns. |
This issue is about whether we want to allow assignment using Variable formulas. Here's an example of where it works properly: Here's an example of where it doesn't work properly, where the '==' is typo'd as '=' in an IF statement: |
@DSCaskey - this is good that you've found out how to prevent the backward variable assignment. Is there a way to validate the operator of an IF statement condition in qmuparser? This may be the problem we want to solve. |
In the Variables Table, a Variable's calculated value can be overwritten from a formula farther down in the Variables table. The updated calculated value is then used to draw the pattern.
The Variables Table should not allow backward updates, this creates recursion. I can provide example of this, but the base problem is ability to update variables that are defined earlier in the table.
In this example, the variable is overwritten directly with a constant, even though the formula wasn't overwritten.
The text was updated successfully, but these errors were encountered: