Revert "fix merge conflict"

This reverts commit ec03b012a7, reversing
changes made to 2af33738d1.
This commit is contained in:
Daniel Schiavini 2018-12-07 10:22:32 +01:00
parent 3ebefa4f8a
commit 4bffa6d90f
73 changed files with 1223 additions and 3054 deletions

View file

@ -64,7 +64,6 @@ Cura.MachineAction
width: parent.width
text: catalog.i18nc("@title:window", "Connect to Networked Printer")
wrapMode: Text.WordWrap
renderType: Text.NativeRendering
font.pointSize: 18
}
@ -73,7 +72,6 @@ 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:")
}
@ -184,7 +182,6 @@ Cura.MachineAction
text: listview.model[index].name
color: parent.ListView.isCurrentItem ? palette.highlightedText : palette.text
elide: Text.ElideRight
renderType: Text.NativeRendering
}
MouseArea
@ -207,7 +204,6 @@ 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)
}
@ -225,7 +221,6 @@ Cura.MachineAction
text: base.selectedDevice ? base.selectedDevice.name : ""
font: UM.Theme.getFont("large")
elide: Text.ElideRight
renderType: Text.NativeRendering
}
Grid
{
@ -236,14 +231,12 @@ 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)
@ -275,28 +268,24 @@ 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 : ""
}
}
@ -305,7 +294,6 @@ 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)
@ -327,7 +315,6 @@ 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." )
}
@ -371,10 +358,9 @@ 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("default") // 12pt, regular
font: UM.Theme.getFont("very_small") // 12pt, regular
text: ""
// FIXED-LINE-HEIGHT:

View file

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

View file

@ -179,15 +179,13 @@ 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", "Unreachable")
if (printer && printer.state == "unreachable"){
return catalog.i18nc("@label:status", "Unavailable")
}
if (printer && printer.state == "idle")
if (printer && !printer.activePrintJob)
{
return catalog.i18nc("@label:status", "Idle")
}

View file

@ -572,17 +572,7 @@ 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"])
# 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)
)
material_group_list = material_manager.getMaterialGroupListByGUID(material_data["guid"]) or []
# 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))