Fixed extruder offsets not being properly editable in printer profiles

Closes #677
This commit is contained in:
Gina Häußge 2014-12-19 09:54:11 +01:00
parent c2f0f6c7c4
commit 270231a004
2 changed files with 2 additions and 2 deletions

View file

@ -146,7 +146,7 @@ def _validate_profile(profile):
converted_offsets = []
for offset in profile["extruder"]["offsets"]:
try:
converted_offsets.append((float(offset[0]), float(offset[0])))
converted_offsets.append((float(offset[0]), float(offset[1])))
except:
return False
profile["extruder"]["offsets"] = converted_offsets

View file

@ -301,7 +301,7 @@ function PrinterProfilesViewModel() {
for (var i = 1; i < self.editorExtruders(); i++) {
var offset = [0.0, 0.0];
if (i < self.editorExtruderOffsets().length) {
offset = self.editorExtruderOffsets()[i];
offset = [parseFloat(self.editorExtruderOffsets()[i]["x"]()), parseFloat(self.editorExtruderOffsets()[i]["y"]())];
}
profile.extruder.offsets.push(offset);
}