mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-23 06:09:38 +08:00
CURA-4461 Show nozzles and buildplates separately depending on the
hardware_type metadata in variants
This commit is contained in:
parent
2613b4d1a3
commit
fd46f6968b
@ -12,7 +12,6 @@ Menu
|
||||
id: menu
|
||||
title: "Build plate"
|
||||
|
||||
property int buildplateIndex: 0
|
||||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||
property bool isClusterPrinter:
|
||||
{
|
||||
@ -66,13 +65,14 @@ Menu
|
||||
filter:
|
||||
{
|
||||
"type": "variant",
|
||||
"hardware_type": "buildplate",
|
||||
"definition": Cura.MachineManager.activeDefinitionId //Only show variants of this machine
|
||||
}
|
||||
}
|
||||
MenuItem {
|
||||
text: model.name
|
||||
checkable: true
|
||||
checked: model.id == Cura.MachineManager.buildplateIds[buildplateIndex]
|
||||
// checked: model.id == Cura.MachineManager.buildplateIds[buildplateIndex]
|
||||
exclusiveGroup: group
|
||||
onTriggered:
|
||||
{
|
||||
|
@ -68,8 +68,17 @@ Menu
|
||||
{
|
||||
filter:
|
||||
{
|
||||
"type": "variant",
|
||||
"definition": Cura.MachineManager.activeQualityDefinitionId //Only show variants of this machine
|
||||
var filter_dict =
|
||||
{
|
||||
"type": "variant",
|
||||
"definition": Cura.MachineManager.activeQualityDefinitionId //Only show variants of this machine
|
||||
}
|
||||
if (Cura.MachineManager.hasVariantBuildplates)
|
||||
{
|
||||
filter_dict["hardware_type"] = "nozzle"
|
||||
}
|
||||
|
||||
return filter_dict
|
||||
}
|
||||
}
|
||||
MenuItem {
|
||||
|
@ -242,7 +242,7 @@ Column
|
||||
Label
|
||||
{
|
||||
id: materialLabel
|
||||
text: catalog.i18nc("@label","Material");
|
||||
text: catalog.i18nc("@label", "Material");
|
||||
width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("text");
|
||||
@ -279,7 +279,7 @@ Column
|
||||
{
|
||||
id: variantRow
|
||||
height: UM.Theme.getSize("sidebar_setup").height
|
||||
visible: Cura.MachineManager.hasBuildPlateVariant && !sidebar.monitoringPrint && !sidebar.hideSettings
|
||||
visible: Cura.MachineManager.hasVariants && !sidebar.monitoringPrint && !sidebar.hideSettings
|
||||
|
||||
anchors
|
||||
{
|
||||
@ -332,7 +332,7 @@ Column
|
||||
Label
|
||||
{
|
||||
id: bulidplateLabel
|
||||
text: catalog.i18nc("@label","Buildplate");
|
||||
text: catalog.i18nc("@label", "Build plate");
|
||||
width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("text");
|
||||
@ -350,7 +350,7 @@ Column
|
||||
style: UM.Theme.styles.sidebar_header_button
|
||||
activeFocusOnPress: true;
|
||||
|
||||
menu: BuildplateMenu
|
||||
menu: BuildplateMenu {}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user