Merge pull request #5611 from Ultimaker/CURA-6449_fix_non_host_printers

CURA-6449 Disable printers that are not host of a group
This commit is contained in:
Remco Burema 2019-04-17 13:06:38 +02:00 committed by GitHub
commit 4c214f5b2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 4 deletions

View file

@ -68,6 +68,10 @@ Item
anchors.fill: parent
model: CuraApplication.getDiscoveredPrintersModel().discoveredPrinters
section.property: "modelData.sectionName"
section.criteria: ViewSection.FullString
section.delegate: sectionHeading
Component.onCompleted:
{
// Select the first one that's not "unknown" by default.
@ -81,6 +85,23 @@ Item
}
}
Component
{
id: sectionHeading
Label
{
anchors.left: parent.left
anchors.leftMargin: UM.Theme.getSize("default_margin").width
height: UM.Theme.getSize("setting_control").height
text: section
font: UM.Theme.getFont("default")
color: UM.Theme.getColor("small_button_text")
verticalAlignment: Text.AlignVCenter
renderType: Text.NativeRendering
}
}
delegate: Cura.MachineSelectorButton
{
text: modelData.device.name
@ -88,7 +109,7 @@ Item
width: networkPrinterListView.width
outputDevice: modelData.device
enabled: !modelData.isUnknownMachineType
enabled: !modelData.isUnknownMachineType && modelData.isHostOfGroup
printerTypeLabelAutoFit: true