Remove deprecated functions in MachineManager

CURA-6858
This commit is contained in:
Lipu Fei 2019-10-22 13:18:01 +02:00
parent 7544d049c5
commit 38ee4bf208
15 changed files with 27 additions and 170 deletions

View file

@ -84,7 +84,7 @@ UM.ManagementPage
Flow
{
id: machineActions
visible: currentItem && currentItem.id == Cura.MachineManager.activeMachineId
visible: currentItem && currentItem.id == Cura.MachineManager.activeMachine.id
anchors.left: parent.left
anchors.right: parent.right
anchors.top: machineName.bottom

View file

@ -103,7 +103,7 @@ Item
id: activateMenuButton
text: catalog.i18nc("@action:button", "Activate")
iconName: "list-activate"
enabled: !isCurrentItemActivated && Cura.MachineManager.hasMaterials
enabled: !isCurrentItemActivated && Cura.MachineManager.activeMachine.hasMaterials
onClicked:
{
forceActiveFocus()
@ -227,7 +227,7 @@ Item
text:
{
var caption = catalog.i18nc("@action:label", "Printer") + ": " + Cura.MachineManager.activeMachine.name;
if (Cura.MachineManager.hasVariants)
if (Cura.MachineManager.activeMachine.hasVariants)
{
var activeVariantName = ""
if(Cura.MachineManager.activeStack != null)

View file

@ -449,7 +449,7 @@ TabView
UM.ContainerPropertyProvider
{
id: variantPropertyProvider
containerId: Cura.MachineManager.activeVariantId
containerId: Cura.MachineManager.activeStack.variant.id
watchedProperties: [ "value" ]
key: model.key
}

View file

@ -393,7 +393,7 @@ Item
left: parent.left
}
visible: text != ""
text: catalog.i18nc("@label %1 is printer name", "Printer: %1").arg(Cura.MachineManager.activeMachineName)
text: catalog.i18nc("@label %1 is printer name", "Printer: %1").arg(Cura.MachineManager.activeMachine.name)
width: profileScrollView.width
elide: Text.ElideRight
}