mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
Fixes problems with the upgraded parts page of the add Original wizard
The setMachineSettingValue functionalities are now bound to whether the checkboxes are checked or not instead of onClicked. Also the wizard now saves the values, so the user cannot get confused when revisiting this part of the wizard. commits to #143 contributes to #CURA-256
This commit is contained in:
parent
861b535f9d
commit
f9f0969a6d
1 changed files with 19 additions and 7 deletions
|
@ -14,6 +14,19 @@ Item
|
|||
|
||||
SystemPalette{id: palette}
|
||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||
|
||||
Component.onDestruction:
|
||||
{
|
||||
base.addOriginalProgress.upgrades[0] = extruderCheckBox.checked
|
||||
base.addOriginalProgress.upgrades[1] = heatedBedCheckBox1.checked
|
||||
base.addOriginalProgress.upgrades[2] = heatedBedCheckBox2.checked
|
||||
if (extruderCheckBox.checked == true){
|
||||
UM.MachineManager.setMachineSettingValue("machine_extruder_drive_upgrade", true);
|
||||
}
|
||||
if (heatedBedCheckBox1.checked == true || heatedBedCheckBox2.checked == true){
|
||||
UM.MachineManager.setMachineSettingValue("machine_heated_bed", true)
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: pageTitle
|
||||
|
@ -43,18 +56,17 @@ Item
|
|||
width: parent.width - UM.Theme.sizes.default_margin.width
|
||||
CheckBox
|
||||
{
|
||||
id: checkBox
|
||||
id: extruderCheckBox
|
||||
text: catalog.i18nc("@option:check","Extruder driver ugrades")
|
||||
checked: true
|
||||
onClicked: UM.MachineManager.setMachineSettingValue("machine_extruder_drive_upgrade", true);
|
||||
checked: base.addOriginalProgress.upgrades[0]
|
||||
}
|
||||
CheckBox
|
||||
{
|
||||
id: heatedBedCheckBox1
|
||||
text: catalog.i18nc("@option:check","Heated printer bed (standard kit)")
|
||||
y: checkBox.height * 1
|
||||
y: extruderCheckBox.height * 1
|
||||
checked: base.addOriginalProgress.upgrades[1]
|
||||
onClicked: {
|
||||
UM.MachineManager.setMachineSettingValue("machine_heated_bed", true)
|
||||
if (heatedBedCheckBox2.checked == true)
|
||||
heatedBedCheckBox2.checked = false
|
||||
}
|
||||
|
@ -63,9 +75,9 @@ Item
|
|||
{
|
||||
id: heatedBedCheckBox2
|
||||
text: catalog.i18nc("@option:check","Heated printer bed (self built)")
|
||||
y: checkBox.height * 2
|
||||
y: extruderCheckBox.height * 2
|
||||
checked: base.addOriginalProgress.upgrades[2]
|
||||
onClicked: {
|
||||
UM.MachineManager.setMachineSettingValue("machine_heated_bed", true)
|
||||
if (heatedBedCheckBox1.checked == true)
|
||||
heatedBedCheckBox1.checked = false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue