这是indexloc提供的服务,不要输入任何密码
Skip to content

fix: prevent uiscale from being zero #340

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

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

ylmrx
Copy link
Contributor

@ylmrx ylmrx commented Jan 6, 2024

No description provided.

@ylmrx
Copy link
Contributor Author

ylmrx commented Jan 6, 2024

When entering a uiscale, if the user starts with '0' or '.', Tooll will parse it as a 0, and the UI will break immediately (the field lose the focus, it can't be edited anymore, the 0 value is saved to userSettings and has to be fixed manually there)

This patch prevent such situation from happening by forcing it back to some minimal value when it get to close to zero and let the edit happen entirely.

Copy link
Collaborator

@pixtur pixtur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for you fix. That's a excellent and straight forward contribution.
With the T3 code base we try to follow the .net coding style guideline, It would be great if you could insert the leading zeros for consistency's sake.

Co-authored-by: Thomas Mann <thomas.mann@framefield.com>
@pixtur pixtur merged commit ab59fc2 into tixl3d:dev Jan 17, 2024
@pixtur
Copy link
Collaborator

pixtur commented Jan 17, 2024

Thanks!

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.

2 participants