WIP: Refactor setMaterialName()

This commit is contained in:
Lipu Fei 2018-02-16 14:17:35 +01:00
parent e5cc7efdf2
commit f7f9c68fcc
2 changed files with 10 additions and 16 deletions

View file

@ -454,14 +454,13 @@ TabView
// update the display name of the material
function updateMaterialDisplayName (old_name, new_name) {
// don't change when new name is the same
if (old_name == new_name) {
return
}
// update the values
Cura.ContainerManager.setContainerName(base.containerId, new_name)
Cura.ContainerManager.setMaterialName(base.currentMaterialNode, new_name)
materialProperties.name = new_name
}