Merge branch '5.3' of github.com:Ultimaker/Cura

This commit is contained in:
Jaime van Kessel 2023-03-17 10:42:36 +01:00
commit 1e0fc60008
No known key found for this signature in database
GPG key ID: C85F7A3AF1BAA7C4
2 changed files with 10 additions and 17 deletions

View file

@ -303,18 +303,17 @@ Item
Component.onCompleted:
{
update()
updateModel();
}
function update()
function updateModel()
{
clear()
for (var i = 1; i <= Cura.MachineManager.activeMachine.maxExtruderCount; i++)
{
clear();
for (var i = 1; i <= Cura.MachineManager.activeMachine.maxExtruderCount; i ++) {
// Use String as value. JavaScript only has Number. PropertyProvider.setPropertyValue()
// takes a QVariant as value, and Number gets translated into a float. This will cause problem
// for integer settings such as "Number of Extruders".
append({ text: String(i), value: String(i) })
append({ text: String(i), value: String(i) });
}
}
}
@ -322,7 +321,9 @@ Item
Connections
{
target: Cura.MachineManager
function onGlobalContainerChanged() { extruderCountModel.update() }
function onGlobalContainerChanged() {
extruderCountModel.updateModel();
}
}
}