mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
WIP: Disable unknown printer type buttons
This commit is contained in:
parent
2b0e9ea439
commit
b3621bae84
4 changed files with 30 additions and 4 deletions
|
@ -70,7 +70,20 @@ Item
|
|||
id: networkPrinterListView
|
||||
anchors.fill: parent
|
||||
model: CuraApplication.getDiscoveredPrintersModel().discovered_printers
|
||||
//visible: base.visible && model.length > 0
|
||||
|
||||
Component.onCompleted:
|
||||
{
|
||||
// select the first one that's not "unknown" by default.
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
|
||||
if (!model[i].is_unknown_machine_type)
|
||||
{
|
||||
currentIndex = i
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
delegate: MachineSelectorButton
|
||||
{
|
||||
|
@ -81,6 +94,8 @@ Item
|
|||
anchors.rightMargin: 10
|
||||
outputDevice: modelData.device
|
||||
|
||||
enabled: !modelData.is_unknown_machine_type
|
||||
|
||||
printerTypeLabelAutoFit: true
|
||||
|
||||
updatePrinterTypesFunction: updateMachineTypes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue