diff --git a/cura/ExtruderManager.py b/cura/ExtruderManager.py index 102f7d7fc0..a14d5427c4 100644 --- a/cura/ExtruderManager.py +++ b/cura/ExtruderManager.py @@ -58,6 +58,9 @@ class ExtruderManager(QObject): cls.__instance = ExtruderManager() return cls.__instance + ## Changes the active extruder by index. + # + # \param index The index of the new active extruder. @pyqtSlot(int) def setActiveExtruderIndex(self, index): self._active_extruder_index = index diff --git a/cura/ExtrudersModel.py b/cura/ExtrudersModel.py index 1efc86d9c5..afc3b6ee67 100644 --- a/cura/ExtrudersModel.py +++ b/cura/ExtrudersModel.py @@ -54,10 +54,15 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): for index, extruder in enumerate(manager.getMachineExtruders(global_container_stack.getBottom().getId())): material = extruder.findContainer({ "type": "material" }) colour = material.getMetaDataEntry("color_code", default = "#FFFF00") if material else "#FFFF00" + position = extruder.getBottom().getMetaDataEntry("position", default = "0") #Position in the definition. + try: + position = int(position) + except ValueError: #Not a proper int. + position = -1 item = { #Construct an item with only the relevant information. "name": extruder.getName(), "colour": colour, - "index": index + "index": position } self.appendItem(item) self.sort(lambda item: item["index"]) \ No newline at end of file diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 8be258c79e..2bb1f6acff 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1043,7 +1043,7 @@ "speed_wall_0": { "label": "Outer Wall Speed", - "description": "The speed at which the outermost walls are printed. Printing the outer wall at a lower speed improves the final skin quality. However, having a large difference between the inner wall speed and the outer wall speed will effect quality in a negative way.", + "description": "The speed at which the outermost walls are printed. Printing the outer wall at a lower speed improves the final skin quality. However, having a large difference between the inner wall speed and the outer wall speed will affect quality in a negative way.", "unit": "mm/s", "type": "float", "minimum_value": "0.1", diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index faf72bfc7a..ac57dbba35 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -49,8 +49,7 @@ UM.ManagementPage onActivateObject: Cura.MachineManager.setActiveQuality(currentItem.id) onAddObject: { var selectedContainer; - if (objectList.currentIndex == 0) { - // Current settings + if (objectList.currentItem.id == Cura.MachineManager.activeQualityId) { selectedContainer = Cura.MachineManager.convertUserContainerToQuality(); } else { selectedContainer = Cura.MachineManager.duplicateContainer(base.currentItem.id); diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 75f5393d57..60f5af2e73 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -110,8 +110,9 @@ Item checked: base.currentExtruderIndex == index onClicked: { - base.currentExtruderIndex = index - ExtruderManager.setActiveExtruderIndex(index) + extruderSelection.focus = true; //Changing focus applies the currently-being-typed values so it can change the displayed setting values. + base.currentExtruderIndex = index; + ExtruderManager.setActiveExtruderIndex(index); } style: ButtonStyle {