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

Value of DragValue correctly clamped #405

Merged
merged 2 commits into from
May 18, 2021
Merged

Value of DragValue correctly clamped #405

merged 2 commits into from
May 18, 2021

Conversation

vihdzp
Copy link
Contributor

@vihdzp vihdzp commented May 17, 2021

Closes #404.

@emilk
Copy link
Owner

emilk commented May 17, 2021

Good catch! There is one additional line that needs fixing. At the end of the function there is this:

response.changed = get(&mut get_set_value) != value;

this should probably be changed to

response.changed = get(&mut get_set_value) != old_value;

so that we also set the changed flag when the value changes due to the clamping.

@vihdzp
Copy link
Contributor Author

vihdzp commented May 17, 2021

I've implemented this fix in the latest commit.

@emilk emilk merged commit de02f7d into emilk:master May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clamping a DragValue clears invalid value visually but not internally
2 participants