From 14b9294a3944196eef01401741807e279570969a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 8 Jun 2016 17:02:00 +0200 Subject: [PATCH 1/5] Document setActiveExtruderIndex Contributes to issues CURA-340 and CURA-1278. --- cura/ExtruderManager.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cura/ExtruderManager.py b/cura/ExtruderManager.py index c8a07a4000..bd0c3956d3 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 From 1149a96d70c2ff44167d6c607e95ee4636605ea4 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 9 Jun 2016 10:45:20 +0200 Subject: [PATCH 2/5] Fix spelling --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", From 5da366583273b4a9fe1061d1ed1c3f104276f630 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 9 Jun 2016 11:22:33 +0200 Subject: [PATCH 3/5] Fix duplicating the first item on the Profiles page CURA-1585 --- resources/qml/Preferences/ProfilesPage.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); From 4bdd5713f19e2d8a7c2c656dec5d2ee24fe6b105 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 9 Jun 2016 11:35:23 +0200 Subject: [PATCH 4/5] Fix extruder number attached to extruders It reads that from position in the extruder definition file. Contributes to issues CURA-1278 and CURA-340. --- cura/ExtrudersModel.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cura/ExtrudersModel.py b/cura/ExtrudersModel.py index 60bd60abab..37487f838c 100644 --- a/cura/ExtrudersModel.py +++ b/cura/ExtrudersModel.py @@ -51,13 +51,18 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): global_container_stack = UM.Application.getInstance().getGlobalContainerStack() if not global_container_stack: return #There is no machine to get the extruders of. - for index, extruder in enumerate(manager.getMachineExtruders(global_container_stack.getBottom())): + for extruder in manager.getMachineExtruders(global_container_stack.getBottom()): 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 From 6a520cad47c547b896db6dc02c4125e760faff6d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 9 Jun 2016 11:48:21 +0200 Subject: [PATCH 5/5] Change focus upon extruder switch This applies a setting that is currently being typed by the user. Otherwise it would take the currently being typed value along to the next tab, since it can't update a setting value while it is in focus. Contributes to issues CURA-340 and CURA-1278. --- resources/qml/SidebarHeader.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 {