Merge branch 'master' of ssh://github.com/Ultimaker/Cura

This commit is contained in:
Ghostkeeper 2018-07-09 15:03:01 +02:00
commit 4dcb6c685e
No known key found for this signature in database
GPG Key ID: 5252B696FB5E7C7A

View File

@ -515,7 +515,7 @@ TabView
if(entry_name in materialPreferenceValues[material_guid] && materialPreferenceValues[material_guid][entry_name] == new_value)
{
// value has not changed
return
return;
}
materialPreferenceValues[material_guid][entry_name] = new_value;
@ -531,34 +531,33 @@ TabView
}
var material_weight = Cura.ContainerManager.getContainerMetaDataEntry(base.containerId, "properties", "weight");
if(material_weight != undefined && material_weight != "")
{
return material_weight
}
return 0;
return material_weight || 0;
}
// update the display name of the material
function updateMaterialDisplayName (old_name, new_name) {
function updateMaterialDisplayName (old_name, new_name)
{
// don't change when new name is the same
if (old_name == new_name) {
return
return;
}
// update the values
base.materialManager.setMaterialName(base.currentMaterialNode, new_name)
materialProperties.name = new_name
base.materialManager.setMaterialName(base.currentMaterialNode, new_name);
materialProperties.name = new_name;
}
// update the type of the material
function updateMaterialType (old_type, new_type) {
base.setMetaDataEntry("material", old_type, new_type)
materialProperties.material= new_type
function updateMaterialType (old_type, new_type)
{
base.setMetaDataEntry("material", old_type, new_type);
materialProperties.material= new_type;
}
// update the brand of the material
function updateMaterialBrand (old_brand, new_brand) {
base.setMetaDataEntry("brand", old_brand, new_brand)
materialProperties.brand = new_brand
function updateMaterialBrand (old_brand, new_brand)
{
base.setMetaDataEntry("brand", old_brand, new_brand);
materialProperties.brand = new_brand;
}
}