mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 01:37:51 -06:00
Disable printers that are not host of a group
CURA-6449 - Group printers into hosts and non-hosts and of unknown type. - Show available/connectable printers first in the list. - Show sections for connectable and non-connectable printers.
This commit is contained in:
parent
7d644c0d1a
commit
588dd6cd78
3 changed files with 36 additions and 4 deletions
|
@ -71,6 +71,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.
|
||||
|
@ -84,6 +88,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: MachineSelectorButton
|
||||
{
|
||||
text: modelData.device.name
|
||||
|
@ -93,7 +114,7 @@ Item
|
|||
anchors.rightMargin: UM.Theme.getSize("default_margin").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