mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +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
|
id: menu
|
||||||
title: "Build plate"
|
title: "Build plate"
|
||||||
|
|
||||||
property int buildplateIndex: 0
|
|
||||||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||||
property bool isClusterPrinter:
|
property bool isClusterPrinter:
|
||||||
{
|
{
|
||||||
@ -66,13 +65,14 @@ Menu
|
|||||||
filter:
|
filter:
|
||||||
{
|
{
|
||||||
"type": "variant",
|
"type": "variant",
|
||||||
|
"hardware_type": "buildplate",
|
||||||
"definition": Cura.MachineManager.activeDefinitionId //Only show variants of this machine
|
"definition": Cura.MachineManager.activeDefinitionId //Only show variants of this machine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: model.name
|
text: model.name
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: model.id == Cura.MachineManager.buildplateIds[buildplateIndex]
|
// checked: model.id == Cura.MachineManager.buildplateIds[buildplateIndex]
|
||||||
exclusiveGroup: group
|
exclusiveGroup: group
|
||||||
onTriggered:
|
onTriggered:
|
||||||
{
|
{
|
||||||
|
@ -68,8 +68,17 @@ Menu
|
|||||||
{
|
{
|
||||||
filter:
|
filter:
|
||||||
{
|
{
|
||||||
"type": "variant",
|
var filter_dict =
|
||||||
"definition": Cura.MachineManager.activeQualityDefinitionId //Only show variants of this machine
|
{
|
||||||
|
"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 {
|
MenuItem {
|
||||||
|
@ -242,7 +242,7 @@ Column
|
|||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: materialLabel
|
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)
|
width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
|
||||||
font: UM.Theme.getFont("default");
|
font: UM.Theme.getFont("default");
|
||||||
color: UM.Theme.getColor("text");
|
color: UM.Theme.getColor("text");
|
||||||
@ -279,7 +279,7 @@ Column
|
|||||||
{
|
{
|
||||||
id: variantRow
|
id: variantRow
|
||||||
height: UM.Theme.getSize("sidebar_setup").height
|
height: UM.Theme.getSize("sidebar_setup").height
|
||||||
visible: Cura.MachineManager.hasBuildPlateVariant && !sidebar.monitoringPrint && !sidebar.hideSettings
|
visible: Cura.MachineManager.hasVariants && !sidebar.monitoringPrint && !sidebar.hideSettings
|
||||||
|
|
||||||
anchors
|
anchors
|
||||||
{
|
{
|
||||||
@ -332,7 +332,7 @@ Column
|
|||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: bulidplateLabel
|
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)
|
width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("default_margin").width)
|
||||||
font: UM.Theme.getFont("default");
|
font: UM.Theme.getFont("default");
|
||||||
color: UM.Theme.getColor("text");
|
color: UM.Theme.getColor("text");
|
||||||
@ -350,7 +350,7 @@ Column
|
|||||||
style: UM.Theme.styles.sidebar_header_button
|
style: UM.Theme.styles.sidebar_header_button
|
||||||
activeFocusOnPress: true;
|
activeFocusOnPress: true;
|
||||||
|
|
||||||
menu: BuildplateMenu
|
menu: BuildplateMenu {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user