diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index ce379d35fe..f63abf9713 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -183,7 +183,7 @@ class BuildVolume(SceneNode): min_d = -self._depth / 2 max_d = self._depth / 2 - if self._shape.lower() != "elliptic": + if self._shape != "elliptic": # Outline 'cube' of the build volume mb = MeshBuilder() mb.addLine(Vector(min_w, min_h, min_d), Vector(max_w, min_h, min_d), color = self.VolumeOutlineColor) @@ -614,7 +614,8 @@ class BuildVolume(SceneNode): bottom_unreachable_border = max(bottom_unreachable_border, other_offset_y - offset_y) half_machine_width = self._global_container_stack.getProperty("machine_width", "value") / 2 half_machine_depth = self._global_container_stack.getProperty("machine_depth", "value") / 2 - if self._shape.lower() != "elliptic": + + if self._shape != "elliptic": if border_size - left_unreachable_border > 0: result[extruder_id].append(Polygon(numpy.array([ [-half_machine_width, -half_machine_depth], diff --git a/plugins/MachineSettingsAction/MachineSettingsAction.qml b/plugins/MachineSettingsAction/MachineSettingsAction.qml index a0815b9f2c..a2a8425b22 100644 --- a/plugins/MachineSettingsAction/MachineSettingsAction.qml +++ b/plugins/MachineSettingsAction/MachineSettingsAction.qml @@ -131,11 +131,20 @@ Cura.MachineAction ComboBox { - model: ["Rectangular", "Elliptic"] - currentIndex: machineShapeProvider.properties.value.toLowerCase() != model[1].toLowerCase() ? 0 : 1 + id: shapeComboBox + model: ListModel + { + id: shapesModel + Component.onCompleted: + { + shapesModel.append({ text: catalog.i18nc("@option:build plate shape", "Rectangular"), value: "rectangular" }); + shapesModel.append({ text: catalog.i18nc("@option:build plate shape", "Elliptic"), value: "elliptic" }); + shapeComboBox.currentIndex = machineShapeProvider.properties.value != shapesModel.get(1).value ? 0 : 1 + } + } onActivated: { - machineShapeProvider.setPropertyValue("value", model[index]); + machineShapeProvider.setPropertyValue("value", shapesModel.get(index).value); manager.forceUpdate(); } }