mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 23:06:13 +08:00
Prevent a recurring qml warning
Note that the connect_group metadata is also queried for non-connected printers; the model is not filtered, but non-connected printers are set to be invisible.
This commit is contained in:
parent
3ecdd91223
commit
c81689d233
@ -12,10 +12,18 @@ Instantiator
|
|||||||
model: Cura.GlobalStacksModel {}
|
model: Cura.GlobalStacksModel {}
|
||||||
MenuItem
|
MenuItem
|
||||||
{
|
{
|
||||||
text: model.metadata["connect_group_name"]
|
property string connectGroupName:
|
||||||
|
{
|
||||||
|
if("connect_group_name" in model.metadata)
|
||||||
|
{
|
||||||
|
return model.metadata["connect_group_name"]
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
text: connectGroupName
|
||||||
checkable: true
|
checkable: true
|
||||||
visible: model.hasRemoteConnection
|
visible: model.hasRemoteConnection
|
||||||
checked: Cura.MachineManager.activeMachineNetworkGroupName == model.metadata["connect_group_name"]
|
checked: Cura.MachineManager.activeMachineNetworkGroupName == connectGroupName
|
||||||
exclusiveGroup: group
|
exclusiveGroup: group
|
||||||
onTriggered: Cura.MachineManager.setActiveMachine(model.id)
|
onTriggered: Cura.MachineManager.setActiveMachine(model.id)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user