fix merge conflict

This commit is contained in:
ChrisTerBeke 2018-12-06 16:39:58 +01:00
commit ec03b012a7
73 changed files with 3047 additions and 1216 deletions

View file

@ -64,6 +64,7 @@ Cura.MachineAction
width: parent.width
text: catalog.i18nc("@title:window", "Connect to Networked Printer")
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
font.pointSize: 18
}
@ -72,6 +73,7 @@ Cura.MachineAction
id: pageDescription
width: parent.width
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "To print directly to your printer over the network, please make sure your printer is connected to the network using a network cable or by connecting your printer to your WIFI network. If you don't connect Cura with your printer, you can still use a USB drive to transfer g-code files to your printer.\n\nSelect your printer from the list below:")
}
@ -182,6 +184,7 @@ Cura.MachineAction
text: listview.model[index].name
color: parent.ListView.isCurrentItem ? palette.highlightedText : palette.text
elide: Text.ElideRight
renderType: Text.NativeRendering
}
MouseArea
@ -204,6 +207,7 @@ Cura.MachineAction
anchors.left: parent.left
anchors.right: parent.right
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "If your printer is not listed, read the <a href='%1'>network printing troubleshooting guide</a>").arg("https://ultimaker.com/en/troubleshooting");
onLinkActivated: Qt.openUrlExternally(link)
}
@ -221,6 +225,7 @@ Cura.MachineAction
text: base.selectedDevice ? base.selectedDevice.name : ""
font: UM.Theme.getFont("large")
elide: Text.ElideRight
renderType: Text.NativeRendering
}
Grid
{
@ -231,12 +236,14 @@ Cura.MachineAction
{
width: Math.round(parent.width * 0.5)
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "Type")
}
Label
{
width: Math.round(parent.width * 0.5)
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text:
{
if(base.selectedDevice)
@ -268,24 +275,28 @@ Cura.MachineAction
{
width: Math.round(parent.width * 0.5)
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "Firmware version")
}
Label
{
width: Math.round(parent.width * 0.5)
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: base.selectedDevice ? base.selectedDevice.firmwareVersion : ""
}
Label
{
width: Math.round(parent.width * 0.5)
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: catalog.i18nc("@label", "Address")
}
Label
{
width: Math.round(parent.width * 0.5)
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text: base.selectedDevice ? base.selectedDevice.ipAddress : ""
}
}
@ -294,6 +305,7 @@ Cura.MachineAction
{
width: parent.width
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
text:{
// The property cluster size does not exist for older UM3 devices.
if(!base.selectedDevice || base.selectedDevice.clusterSize == null || base.selectedDevice.clusterSize == 1)
@ -315,6 +327,7 @@ Cura.MachineAction
{
width: parent.width
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
visible: base.selectedDevice != null && !base.completeProperties
text: catalog.i18nc("@label", "The printer at this address has not yet responded." )
}
@ -358,9 +371,10 @@ Cura.MachineAction
Label
{
text: catalog.i18nc("@alabel","Enter the IP address or hostname of your printer on the network.")
text: catalog.i18nc("@alabel", "Enter the IP address or hostname of your printer on the network.")
width: parent.width
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
}
TextField

View file

@ -52,7 +52,7 @@ Item
id: buildplateLabel
color: "#191919" // TODO: Theme!
elide: Text.ElideRight
font: UM.Theme.getFont("very_small") // 12pt, regular
font: UM.Theme.getFont("default") // 12pt, regular
text: ""
// FIXED-LINE-HEIGHT:

View file

@ -49,7 +49,7 @@ Item
}
color: "#191919" // TODO: Theme!
elide: Text.ElideRight
font: UM.Theme.getFont("very_small") // 12pt, regular
font: UM.Theme.getFont("default") // 12pt, regular
text: ""
// FIXED-LINE-HEIGHT:
@ -66,7 +66,7 @@ Item
}
color: "#191919" // TODO: Theme!
elide: Text.ElideRight
font: UM.Theme.getFont("small") // 12pt, bold
font: UM.Theme.getFont("default_bold") // 12pt, bold
text: ""
// FIXED-LINE-HEIGHT:

View file

@ -179,13 +179,15 @@ Item
color: "#414054" // TODO: Theme!
font: UM.Theme.getFont("large") // 16pt, bold
text: {
if (printer && printer.state == "disabled"){
if (printer && printer.state == "disabled")
{
return catalog.i18nc("@label:status", "Unavailable")
}
if (printer && printer.state == "unreachable"){
return catalog.i18nc("@label:status", "Unavailable")
if (printer && printer.state == "unreachable")
{
return catalog.i18nc("@label:status", "Unreachable")
}
if (printer && !printer.activePrintJob)
if (printer && printer.state == "idle")
{
return catalog.i18nc("@label:status", "Idle")
}

View file

@ -572,7 +572,17 @@ class ClusterUM3OutputDevice(NetworkedPrinterOutputDevice):
def _createMaterialOutputModel(self, material_data: Dict[str, Any]) -> "MaterialOutputModel":
material_manager = CuraApplication.getInstance().getMaterialManager()
material_group_list = material_manager.getMaterialGroupListByGUID(material_data["guid"]) or []
material_group_list = material_manager.getMaterialGroupListByGUID(material_data["guid"])
# This can happen if the connected machine has no material in one or more extruders (if GUID is empty), or the
# material is unknown to Cura, so we should return an "empty" or "unknown" material model.
if material_group_list is None:
material_name = "Empty" if len(material_data["guid"]) == 0 else "Unknown"
return MaterialOutputModel(guid = material_data["guid"],
type = material_data.get("type", ""),
color = material_data.get("color", ""),
brand = material_data.get("brand", ""),
name = material_data.get("name", material_name)
)
# Sort the material groups by "is_read_only = True" first, and then the name alphabetically.
read_only_material_group_list = list(filter(lambda x: x.is_read_only, material_group_list))