diff --git a/plugins/SimulationView/SimulationViewMenuComponent.qml b/plugins/SimulationView/SimulationViewMenuComponent.qml index 78b0b2b74f..93bafd4bcd 100644 --- a/plugins/SimulationView/SimulationViewMenuComponent.qml +++ b/plugins/SimulationView/SimulationViewMenuComponent.qml @@ -53,17 +53,38 @@ Cura.ExpandableComponent UM.Label { + id: lineTypeLabel text: layerTypeCombobox.currentText - anchors - { - left: colorSchemeLabel.right - leftMargin: UM.Theme.getSize("default_margin").width - right: parent.right - } + anchors.left: colorSchemeLabel.right + anchors.leftMargin: UM.Theme.getSize("default_margin").width height: parent.height elide: Text.ElideRight font: UM.Theme.getFont("medium") } + + UM.ColorImage + { + id: warningIcon + anchors + { + left: lineTypeLabel.right + leftMargin: UM.Theme.getSize("narrow_margin").width + verticalCenter: parent.verticalCenter + } + width: UM.Theme.getSize("section_icon").width + height: UM.Theme.getSize("section_icon").height + source: UM.Theme.getIcon("Warning") + color: UM.Theme.getColor("warning") + visible: { + // Check if any extruder is unchecked + for (var i = 0; i < viewSettings.extruder_opacities.length; i++) { + if (viewSettings.extruder_opacities[i] <= 0.5 && viewSettings.extruder_opacities[i] !== undefined && viewSettings.extruder_opacities[i] !== "") { + return true; + } + } + return false; + } + } } contentItem: Column @@ -212,11 +233,27 @@ Cura.ExpandableComponent { verticalCenter: parent.verticalCenter left: extrudersModelCheckBox.left - right: extrudersModelCheckBox.right + right: extruderWarningIcon.visible ? extruderWarningIcon.left : swatch.left leftMargin: UM.Theme.getSize("checkbox").width + Math.round(UM.Theme.getSize("default_margin").width / 2) - rightMargin: UM.Theme.getSize("default_margin").width * 2 + rightMargin: UM.Theme.getSize("narrow_margin").width } } + + UM.ColorImage + { + id: extruderWarningIcon + anchors + { + verticalCenter: parent.verticalCenter + right: swatch.left + rightMargin: UM.Theme.getSize("narrow_margin").width + } + width: UM.Theme.getSize("section_icon").width + height: UM.Theme.getSize("section_icon").height + source: UM.Theme.getIcon("Warning") + color: UM.Theme.getColor("warning") + visible: !extrudersModelCheckBox.checked + } } } diff --git a/plugins/SimulationView/plugin.json b/plugins/SimulationView/plugin.json index 7e7561e5c0..a69282796b 100644 --- a/plugins/SimulationView/plugin.json +++ b/plugins/SimulationView/plugin.json @@ -1,7 +1,7 @@ { "name": "Simulation View", "author": "Ultimaker B.V.", - "version": "1.0.1", + "version": "1.0.2", "description": "Provides the preview of sliced layerdata.", "api": 8, "i18n-catalog": "cura"