mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 14:04:03 -06:00
Make build plate shapes translatable
This commit is contained in:
parent
4756168178
commit
dc33d96e8c
2 changed files with 15 additions and 5 deletions
|
@ -131,11 +131,20 @@ Cura.MachineAction
|
|||
|
||||
ComboBox
|
||||
{
|
||||
model: ["Rectangular", "Elliptic"]
|
||||
currentIndex: machineShapeProvider.properties.value.toLowerCase() != model[1].toLowerCase() ? 0 : 1
|
||||
id: shapeComboBox
|
||||
model: ListModel
|
||||
{
|
||||
id: shapesModel
|
||||
Component.onCompleted:
|
||||
{
|
||||
shapesModel.append({ text: catalog.i18nc("@option:build plate shape", "Rectangular"), value: "rectangular" });
|
||||
shapesModel.append({ text: catalog.i18nc("@option:build plate shape", "Elliptic"), value: "elliptic" });
|
||||
shapeComboBox.currentIndex = machineShapeProvider.properties.value != shapesModel.get(1).value ? 0 : 1
|
||||
}
|
||||
}
|
||||
onActivated:
|
||||
{
|
||||
machineShapeProvider.setPropertyValue("value", model[index]);
|
||||
machineShapeProvider.setPropertyValue("value", shapesModel.get(index).value);
|
||||
manager.forceUpdate();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue