Remove some changes, debugging - CURA-4451

WIP - CURA-4451

correctly show not supported when any of the extruders has a not supported profile - CURA-4451

Clean up and add comments - CURA-4451
This commit is contained in:
Chris ter Beke 2017-10-26 09:23:27 +02:00
parent c679f4aa6b
commit b95ba24530
12 changed files with 136 additions and 159 deletions

View file

@ -17,12 +17,12 @@ Menu
MenuItem
{
text: model.name + (model.layer_height != "" ? (" - " + model.layer_height) : "")
text: (model.layer_height != "") ? model.name + " - " + model.layer_height : model.name
checkable: true
checked: Cura.MachineManager.activeQualityChangesId == "" && Cura.MachineManager.activeQualityType == model.metadata.quality_type
checked: Cura.MachineManager.activeQualityId == model.id
exclusiveGroup: group
onTriggered: Cura.MachineManager.setActiveQuality(model.id)
visible: model.available || model.not_supported
visible: model.available
}
onObjectAdded: menu.insertItem(index, object);

View file

@ -63,10 +63,10 @@ Item
menu: ProfileMenu { }
function generateActiveQualityText () {
var result = ""
var result = catalog.i18nc("@", "No Profile Available") // default text
if (Cura.MachineManager.activeQualityName) {
result += Cura.MachineManager.activeQualityName
if (Cura.MachineManager.isActiveQualitySupported ) {
result = Cura.MachineManager.activeQualityName
if (Cura.MachineManager.activeQualityLayerHeight > 0) {
result += " <font color=\"" + UM.Theme.getColor("text_detail") + "\">"

View file

@ -245,35 +245,29 @@ Column
color: UM.Theme.getColor("text");
}
ToolButton {
ToolButton
{
id: materialSelection
text: Cura.MachineManager.activeMaterialName
tooltip: Cura.MachineManager.activeMaterialName
visible: Cura.MachineManager.hasMaterials
property var valueError:
{
var data = Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeMaterialId, "compatible")
if(data == "False")
{
return true
}
else
{
return false
}
}
property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
height: UM.Theme.getSize("setting_control").height
width: parent.width * 0.7 + UM.Theme.getSize("sidebar_margin").width
anchors.right: parent.right
style: UM.Theme.styles.sidebar_header_button
activeFocusOnPress: true;
menu: MaterialMenu {
extruderIndex: base.currentExtruderIndex
}
menu: MaterialMenu { extruderIndex: base.currentExtruderIndex }
property var valueError: !isMaterialSupported()
property var valueWarning: ! Cura.MachineManager.isActiveQualitySupported
function isMaterialSupported () {
return Cura.ContainerManager.getContainerMetaDataEntry(Cura.MachineManager.activeMaterialId, "compatible") == "True"
}
}
}