mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Update swatches on swatch color property changed
CURA-8938
This commit is contained in:
parent
0786ff2c6b
commit
301d68ebf2
2 changed files with 23 additions and 4 deletions
|
|
@ -27,11 +27,15 @@ UM.Dialog
|
|||
"#FFFFFF", "#D3D3D3", "#9E9E9E", "#5A5A5A", "#000000",
|
||||
]
|
||||
|
||||
Component.onCompleted:
|
||||
Component.onCompleted: updateSwatches()
|
||||
onSwatchColorsChanged: updateSwatches()
|
||||
|
||||
function updateSwatches()
|
||||
{
|
||||
for (let i = 0; i < base.swatchColors.length; i ++)
|
||||
swatchColorsModel.clear();
|
||||
for (const swatchColor of base.swatchColors)
|
||||
{
|
||||
swatchColorsModel.append({ swatchColor: base.swatchColors[i] });
|
||||
swatchColorsModel.append({ swatchColor });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue