From e82988f5e4b74946eb01383ec87884ffd1b5219f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 13 Jan 2016 17:04:28 +0100 Subject: [PATCH] Correctly parse legacy speed settings with strange floats If the legacy profile contains float values serialised to '0.0' or '0.00' instead of just '0', this now works correctly instead of evaluating the string comparison to false. Contributes to issue CURA-37. --- plugins/LegacyProfileReader/DictionaryOfDoom.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/LegacyProfileReader/DictionaryOfDoom.json b/plugins/LegacyProfileReader/DictionaryOfDoom.json index b14994b1c1..cc6d867066 100644 --- a/plugins/LegacyProfileReader/DictionaryOfDoom.json +++ b/plugins/LegacyProfileReader/DictionaryOfDoom.json @@ -23,11 +23,11 @@ "retraction_min_travel": "retraction_min_travel", "retraction_hop": "retraction_hop", "speed_print": "print_speed", - "speed_infill": "infill_speed if (infill_speed != \"0\") else print_speed", - "speed_wall_0": "inset0_speed if (inset0_speed != \"0\") else print_speed", - "speed_wall_x": "insetx_speed if (insetx_speed != \"0\") else print_speed", - "speed_topbottom": "solidarea_speed if (solidarea_speed != \"0\") else print_speed", - "speed_travel": "travel_speed if (travel_speed != \"0\") else travel_speed", + "speed_infill": "infill_speed if (float(infill_speed) != 0) else print_speed", + "speed_wall_0": "inset0_speed if (float(inset0_speed) != 0) else print_speed", + "speed_wall_x": "insetx_speed if (float(insetx_speed) != 0) else print_speed", + "speed_topbottom": "solidarea_speed if (float(solidarea_speed) != 0) else print_speed", + "speed_travel": "travel_speed if (float(travel_speed) != 0) else travel_speed", "speed_layer_0": "bottom_layer_speed", "retraction_combing": "True if (retraction_combing == \"All\" or retraction_combing == \"No Skin\") else False", "cool_fan_enabled": "fan_enabled",