mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 21:13:16 +08:00
Remove usages of deprecated activeMachineName
This commit is contained in:
parent
5a25f8e050
commit
c3a373e2a2
@ -123,7 +123,18 @@ UM.Dialog
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: Cura.MachineManager.activeMachineNetworkGroupName != "" ? Cura.MachineManager.activeMachineNetworkGroupName : Cura.MachineManager.activeMachineName
|
||||
text:
|
||||
{
|
||||
if(Cura.MachineManager.activeMachineNetworkGroupName != "")
|
||||
{
|
||||
return Cura.MachineManager.activeMachineNetworkGroupName
|
||||
}
|
||||
if(Cura.MachineManager.activeMachine)
|
||||
{
|
||||
return Cura.MachineManager.activeMachine.name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
width: Math.floor(scroll.width / 3) | 0
|
||||
}
|
||||
}
|
||||
|
@ -200,13 +200,13 @@ Item
|
||||
visible: text != ""
|
||||
text:
|
||||
{
|
||||
var caption = catalog.i18nc("@action:label", "Printer") + ": " + Cura.MachineManager.activeMachineName;
|
||||
var caption = catalog.i18nc("@action:label", "Printer") + ": " + Cura.MachineManager.activeMachine.name;
|
||||
if (Cura.MachineManager.hasVariants)
|
||||
{
|
||||
var activeVariantName = ""
|
||||
if(Cura.MachineManager.activeStack != null)
|
||||
{
|
||||
activeVariantName = Cura.MachineManager.activeStack.variant.name
|
||||
activeVariantName = Cura.MachineManager.activeStack.variant.name
|
||||
}
|
||||
caption += ", " + Cura.MachineManager.activeDefinitionVariantsName + ": " + activeVariantName;
|
||||
}
|
||||
|
@ -32,7 +32,11 @@ Cura.ExpandablePopup
|
||||
{
|
||||
return Cura.MachineManager.activeMachineNetworkGroupName
|
||||
}
|
||||
return Cura.MachineManager.activeMachineName
|
||||
if(Cura.MachineManager.activeStack != null)
|
||||
{
|
||||
return Cura.MachineManager.activeStack.name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
source:
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user