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

Fix NaN values on material print settings tab #1686

Merged
merged 2 commits into from
Apr 18, 2017

Conversation

fieldOfView
Copy link
Collaborator

This PR fixes the print settings showing up as NaN:
NaN material settings

See https://ultimaker.com/en/community/41810-retraction-is-nan for discussion

This way you get sane defaults if no value is provided in the material xml file, instead of 0s
@Ghostkeeper
Copy link
Collaborator

Devs, see CURA-3037.

value: parseFloat(provider.properties.value);
width: base.secondColumnWidth;
value: {
if (!isNaN(parseFloat(materialPropertyProvider.properties.value)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps call parseFloat() just once? For example:

parsedValue = parseFloat(materialPropertyProvider.properties.value);
if (!isNaN(parsedValue))
    ...

@LipuFei LipuFei merged commit 865ab71 into Ultimaker:master Apr 18, 2017
@fieldOfView fieldOfView deleted the fix_material_nan branch April 18, 2017 08:27
@fieldOfView fieldOfView restored the fix_material_nan branch July 11, 2017 09:16
@fieldOfView fieldOfView deleted the fix_material_nan branch July 14, 2017 09:11
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.

3 participants