Move duplicateMaterial() to MaterialManager

This commit is contained in:
Lipu Fei 2018-03-02 17:16:35 +01:00
parent ca785c9df3
commit 7642afb9fe
3 changed files with 63 additions and 56 deletions

View file

@ -13,6 +13,8 @@ import Cura 1.0 as Cura
Item
{
id: base
property QtObject materialManager: CuraApplication.getMaterialManager()
property var resetEnabled: false // Keep PreferencesDialog happy
UM.I18nCatalog { id: catalog; name: "cura"; }
@ -89,7 +91,7 @@ Item
enabled: base.hasCurrentItem
onClicked: {
forceActiveFocus();
base.newRootMaterialIdToSwitchTo = Cura.ContainerManager.duplicateMaterial(base.currentItem.container_node);
base.newRootMaterialIdToSwitchTo = base.materialManager.duplicateMaterial(base.currentItem.container_node);
base.toActivateNewMaterial = true;
}
}