From b3e49f0c12f5c0153acfecb0224705f3fa611efe Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 29 Jun 2017 16:28:01 +0200 Subject: [PATCH] Fix getting the old approximate diameter The properties.approximate_diameter gets updated later via signals, so at this point it's not correct yet. Contributes to issue CURA-2822. --- resources/qml/Preferences/MaterialView.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Preferences/MaterialView.qml b/resources/qml/Preferences/MaterialView.qml index 39f2db0695..23e81067ed 100644 --- a/resources/qml/Preferences/MaterialView.qml +++ b/resources/qml/Preferences/MaterialView.qml @@ -169,7 +169,7 @@ TabView // This does not use a SettingPropertyProvider, because we need to make the change to all containers // which derive from the same base_file var old_diameter = Cura.ContainerManager.getContainerProperty(base.containerId, "material_diameter", "value").toString(); - base.setMetaDataEntry("approximate_diameter", properties.approximate_diameter, Math.round(value).toString()); + base.setMetaDataEntry("approximate_diameter", Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "approximate_diameter"), Math.round(value).toString()); base.setMetaDataEntry("properties/diameter", properties.diameter, value); if (Cura.MachineManager.filterMaterialsByMachine && properties.approximate_diameter != Cura.MachineManager.activeMachine.approximateMaterialDiameter) {