Skip to content

Commit

Permalink
Fixed extruder offsets not being properly editable in printer profiles
Browse files Browse the repository at this point in the history
Closes #677
  • Loading branch information
foosel committed Dec 19, 2014
1 parent c2f0f6c commit 270231a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/octoprint/server/api/printer_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/octoprint/static/js/app/viewmodels/printerprofiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 270231a

Please sign in to comment.