Convert global_inherits_stack to int before slicing

Sometimes it was accidentally converted to a float when it passes through Javascript.

Contributes to issue CURA-2055.
This commit is contained in:
Ghostkeeper 2016-08-04 13:25:51 +02:00
parent b89a9a8113
commit de7f32da19
No known key found for this signature in database
GPG key ID: 701948C5954A7385
2 changed files with 2 additions and 2 deletions

View file

@ -227,7 +227,7 @@ class StartSliceJob(Job):
# global_inherits_stack property.
def _buildGlobalInheritsStackMessage(self, stack):
for key in stack.getAllKeys():
extruder = int(stack.getProperty(key, "global_inherits_stack"))
extruder = int(round(float(stack.getProperty(key, "global_inherits_stack"))))
if extruder >= 0: #Set to a specific extruder.
setting_extruder = self._slice_message.addRepeatedMessage("global_inherits_stack")
setting_extruder.name = key