mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 14:34:01 -06:00
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:
commit
4c214f5b2d
3 changed files with 38 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue