mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 05:19:08 +08: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
@ -14,6 +14,19 @@ Item
|
|||||||
|
|
||||||
SystemPalette{id: palette}
|
SystemPalette{id: palette}
|
||||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
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
|
Label
|
||||||
{
|
{
|
||||||
id: pageTitle
|
id: pageTitle
|
||||||
@ -43,18 +56,17 @@ Item
|
|||||||
width: parent.width - UM.Theme.sizes.default_margin.width
|
width: parent.width - UM.Theme.sizes.default_margin.width
|
||||||
CheckBox
|
CheckBox
|
||||||
{
|
{
|
||||||
id: checkBox
|
id: extruderCheckBox
|
||||||
text: catalog.i18nc("@option:check","Extruder driver ugrades")
|
text: catalog.i18nc("@option:check","Extruder driver ugrades")
|
||||||
checked: true
|
checked: base.addOriginalProgress.upgrades[0]
|
||||||
onClicked: UM.MachineManager.setMachineSettingValue("machine_extruder_drive_upgrade", true);
|
|
||||||
}
|
}
|
||||||
CheckBox
|
CheckBox
|
||||||
{
|
{
|
||||||
id: heatedBedCheckBox1
|
id: heatedBedCheckBox1
|
||||||
text: catalog.i18nc("@option:check","Heated printer bed (standard kit)")
|
text: catalog.i18nc("@option:check","Heated printer bed (standard kit)")
|
||||||
y: checkBox.height * 1
|
y: extruderCheckBox.height * 1
|
||||||
|
checked: base.addOriginalProgress.upgrades[1]
|
||||||
onClicked: {
|
onClicked: {
|
||||||
UM.MachineManager.setMachineSettingValue("machine_heated_bed", true)
|
|
||||||
if (heatedBedCheckBox2.checked == true)
|
if (heatedBedCheckBox2.checked == true)
|
||||||
heatedBedCheckBox2.checked = false
|
heatedBedCheckBox2.checked = false
|
||||||
}
|
}
|
||||||
@ -63,9 +75,9 @@ Item
|
|||||||
{
|
{
|
||||||
id: heatedBedCheckBox2
|
id: heatedBedCheckBox2
|
||||||
text: catalog.i18nc("@option:check","Heated printer bed (self built)")
|
text: catalog.i18nc("@option:check","Heated printer bed (self built)")
|
||||||
y: checkBox.height * 2
|
y: extruderCheckBox.height * 2
|
||||||
|
checked: base.addOriginalProgress.upgrades[2]
|
||||||
onClicked: {
|
onClicked: {
|
||||||
UM.MachineManager.setMachineSettingValue("machine_heated_bed", true)
|
|
||||||
if (heatedBedCheckBox1.checked == true)
|
if (heatedBedCheckBox1.checked == true)
|
||||||
heatedBedCheckBox1.checked = false
|
heatedBedCheckBox1.checked = false
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user