From 77cc088b643ff65a11ec63aaa41149380bfda3b2 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 16 Dec 2016 10:22:16 +0100 Subject: [PATCH 1/3] Correct Prime Tower Wall Thickness for if prime_tower_size == 0 If the prime tower size was too small, it would try to take the root of a negative number. Now we just clamp that computation to 0, which is the correct behaviour for when the minimum volume doesn't fit in the prime tower. Contributes to issue CURA-3148. --- 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 7725940553..e81d3e7dd6 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -3755,7 +3755,7 @@ "unit": "mm", "type": "float", "default_value": 2, - "value": "max(2 * min(extruderValues('prime_tower_line_width')), 0.5 * (resolveOrValue('prime_tower_size') - math.sqrt(resolveOrValue('prime_tower_size') ** 2 - max(extruderValues('prime_tower_min_volume')) / resolveOrValue('layer_height'))))", + "value": "max(2 * min(extruderValues('prime_tower_line_width')), 0.5 * (resolveOrValue('prime_tower_size') - math.sqrt(resolveOrValue('prime_tower_size') ** 2 - max(extruderValues('prime_tower_min_volume')) / resolveOrValue('layer_height')) if (resolveOrValue('prime_tower_size') ** 2 > max(extruderValues('prime_tower_min_volume')) / resolveOrValue('layer_height')) else 0))", "resolve": "max(extruderValues('prime_tower_wall_thickness'))", "minimum_value": "0.001", "minimum_value_warning": "2 * min(extruderValues('prime_tower_line_width'))", From 4fdaf734fced17e365f50ac5d56653e577a3bb2e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 16 Dec 2016 10:58:13 +0100 Subject: [PATCH 2/3] Make translation hint a bit more clear for translators The old message didn't really say anything useful. Contributes to issue CURA-3138. --- resources/qml/Menus/MaterialMenu.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Menus/MaterialMenu.qml b/resources/qml/Menus/MaterialMenu.qml index 573dff89dd..ab38de97aa 100644 --- a/resources/qml/Menus/MaterialMenu.qml +++ b/resources/qml/Menus/MaterialMenu.qml @@ -23,7 +23,7 @@ Menu if(printerConnected && Cura.MachineManager.printerOutputDevices[0].materialNames.length > extruderIndex) { var materialName = Cura.MachineManager.printerOutputDevices[0].materialNames[extruderIndex]; - return catalog.i18nc("@title:menuitem %1 is the value from the printer", "Automatic: %1").arg(materialName); + return catalog.i18nc("@title:menuitem %1 is the automatically selected material", "Automatic: %1").arg(materialName); } return ""; } From 0ca157518e5f14838114e93d67cfb2a13b03f5d5 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 16 Dec 2016 11:12:33 +0100 Subject: [PATCH 3/3] Update current item when importing new material Since we select the newly imported material, we need to update the current item so that the window on the right also gets updated. Contributes to issue CURA-3138. --- resources/qml/Preferences/MaterialsPage.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/Preferences/MaterialsPage.qml b/resources/qml/Preferences/MaterialsPage.qml index 70e3780707..264bc182e6 100644 --- a/resources/qml/Preferences/MaterialsPage.qml +++ b/resources/qml/Preferences/MaterialsPage.qml @@ -278,6 +278,7 @@ UM.ManagementPage { messageDialog.icon = StandardIcon.Information messageDialog.text = catalog.i18nc("@info:status", "Successfully imported material %1").arg(fileUrl) + currentItem = base.model.getItem(base.objectList.currentIndex) } else if(result.status == "duplicate") {