Skip to content
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

LengthParameter stuck on previous default value #315

Closed
JansenSmith opened this issue Feb 20, 2023 · 1 comment
Closed

LengthParameter stuck on previous default value #315

JansenSmith opened this issue Feb 20, 2023 · 1 comment
Assignees
Labels

Comments

@JansenSmith
Copy link
Member

in commit TechnocopiaPlant/TendyTheTankEngine@255a4e1
LengthParameter trackDistFromWall = new LengthParameter("Track Distance from Wall (mm)", 500, [0, 1000])
is effectively followed by
println("trackDistFromWall: ")
println(trackDistFromWall.getMM())

but the result is
trackDistFromWall:
100.0

This erroneous value is also reflected in the represented geometry.

@madhephaestus
Copy link
Member

madhephaestus commented Feb 20, 2023

This is expected behavior if the first time you created this parameter at 100.

I expect what you are looking for is trackDistFromWall.setMM(100)

Length parameters are stored to a json file, and modified with the setMM() or from an interaction on the screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants