From 85059882fedd73525ccae1a59287b3614bf7609a Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Fri, 16 Feb 2018 11:01:02 +0100 Subject: [PATCH] CURA-4959 Add buildplate information to the summary when saving a project file. - The activeVariantNames now returns only the names of the variants in the extruder stacks. --- cura/Settings/MachineManager.py | 3 ++- resources/qml/WorkspaceSummaryDialog.qml | 25 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 7e0e67a7e0..cc5c4aa539 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -559,7 +559,8 @@ class MachineManager(QObject): def activeVariantNames(self) -> List[str]: result = [] - active_stacks = ExtruderManager.getInstance().getActiveGlobalAndExtruderStacks() + # Just return the variants in the extruder stack(s). For the variant in the global stack, use activeVariantBuildplateName + active_stacks = ExtruderManager.getInstance().getActiveExtruderStacks() if active_stacks is not None: for stack in active_stacks: variant_container = stack.variant diff --git a/resources/qml/WorkspaceSummaryDialog.qml b/resources/qml/WorkspaceSummaryDialog.qml index d5cc416f39..a05dee5a9a 100644 --- a/resources/qml/WorkspaceSummaryDialog.qml +++ b/resources/qml/WorkspaceSummaryDialog.qml @@ -120,6 +120,31 @@ UM.Dialog width: (parent.width / 3) | 0 } } + Column + { + width: parent.width + visible: Cura.MachineManager.hasVariantBuildplates + Item // Spacer + { + height: spacerHeight + width: height + } + Row + { + width: parent.width + height: childrenRect.height + Label + { + text: catalog.i18nc("@action:label", "Build plate") + width: (parent.width / 3) | 0 + } + Label + { + text: Cura.MachineManager.activeVariantBuildplateName + width: (parent.width / 3) | 0 + } + } + } Repeater {