mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 21:59:37 +08:00
Remove usages of deprecated function
This commit is contained in:
parent
18630fa2f1
commit
d42f446d70
@ -140,7 +140,7 @@ UM.Dialog
|
|||||||
}
|
}
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
text: Cura.MachineManager.activeVariantBuildplateName
|
text: Cura.activeStack != null ? Cura.MachineManager.activeStack.variant.name : ""
|
||||||
width: Math.floor(scroll.width / 3) | 0
|
width: Math.floor(scroll.width / 3) | 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -319,8 +319,8 @@ Item
|
|||||||
OldControls.ToolButton
|
OldControls.ToolButton
|
||||||
{
|
{
|
||||||
id: variantSelection
|
id: variantSelection
|
||||||
text: Cura.MachineManager.activeVariantName
|
text: Cura.MachineManager.activeStack != null ? Cura.MachineManager.activeStack.variant.name : ""
|
||||||
tooltip: Cura.MachineManager.activeVariantName
|
tooltip: text
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: selectors.controlWidth
|
width: selectors.controlWidth
|
||||||
style: UM.Theme.styles.print_setup_header_button
|
style: UM.Theme.styles.print_setup_header_button
|
||||||
|
@ -203,7 +203,12 @@ Item
|
|||||||
var caption = catalog.i18nc("@action:label", "Printer") + ": " + Cura.MachineManager.activeMachineName;
|
var caption = catalog.i18nc("@action:label", "Printer") + ": " + Cura.MachineManager.activeMachineName;
|
||||||
if (Cura.MachineManager.hasVariants)
|
if (Cura.MachineManager.hasVariants)
|
||||||
{
|
{
|
||||||
caption += ", " + Cura.MachineManager.activeDefinitionVariantsName + ": " + Cura.MachineManager.activeVariantName;
|
var activeVariantName = ""
|
||||||
|
if(Cura.MachineManager.activeStack != null)
|
||||||
|
{
|
||||||
|
activeVariantName = Cura.MachineManager.activeStack.variant.name
|
||||||
|
}
|
||||||
|
caption += ", " + Cura.MachineManager.activeDefinitionVariantsName + ": " + activeVariantName;
|
||||||
}
|
}
|
||||||
return caption;
|
return caption;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user