mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 21:48:58 +08:00
CURA-4870 Force update the list model also when the output device
changes.
This commit is contained in:
parent
c712cbb664
commit
311b5ac791
@ -17,6 +17,13 @@ Column
|
|||||||
padding: UM.Theme.getSize("default_margin").width
|
padding: UM.Theme.getSize("default_margin").width
|
||||||
spacing: Math.round(UM.Theme.getSize("default_margin").height / 2)
|
spacing: Math.round(UM.Theme.getSize("default_margin").height / 2)
|
||||||
|
|
||||||
|
function forceModelUpdate()
|
||||||
|
{
|
||||||
|
// FIXME For now the model should be removed and then created again, otherwise changes in the printer don't automatically update the UI
|
||||||
|
configurationList.model = []
|
||||||
|
configurationList.model = outputDevice.uniqueConfigurations
|
||||||
|
}
|
||||||
|
|
||||||
Label
|
Label
|
||||||
{
|
{
|
||||||
id: configurationListHeading
|
id: configurationListHeading
|
||||||
@ -78,9 +85,16 @@ Column
|
|||||||
target: outputDevice
|
target: outputDevice
|
||||||
onUniqueConfigurationsChanged:
|
onUniqueConfigurationsChanged:
|
||||||
{
|
{
|
||||||
// FIXME For now the model should be removed and then created again, otherwise changes in the printer don't automatically update the UI
|
forceModelUpdate()
|
||||||
configurationList.model = []
|
}
|
||||||
configurationList.model = outputDevice.uniqueConfigurations
|
}
|
||||||
|
|
||||||
|
Connections
|
||||||
|
{
|
||||||
|
target: Cura.MachineManager
|
||||||
|
onOutputDevicesChanged:
|
||||||
|
{
|
||||||
|
forceModelUpdate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user