mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 02:35:53 +08:00
Merge branch 'feature_CURA-3397_profile_override_dialog_options' of https://github.com/LipuFei/Cura
This commit is contained in:
commit
856562236e
@ -64,7 +64,7 @@ UM.Dialog
|
|||||||
anchors.margins: UM.Theme.getSize("default_margin").width
|
anchors.margins: UM.Theme.getSize("default_margin").width
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
height: base.height - 130
|
height: base.height - 200
|
||||||
id: tableView
|
id: tableView
|
||||||
Component
|
Component
|
||||||
{
|
{
|
||||||
@ -146,7 +146,25 @@ UM.Dialog
|
|||||||
]
|
]
|
||||||
width: 300
|
width: 300
|
||||||
currentIndex: UM.Preferences.getValue("cura/choice_on_profile_override")
|
currentIndex: UM.Preferences.getValue("cura/choice_on_profile_override")
|
||||||
onCurrentIndexChanged: UM.Preferences.setValue("cura/choice_on_profile_override", currentIndex)
|
onCurrentIndexChanged:
|
||||||
|
{
|
||||||
|
UM.Preferences.setValue("cura/choice_on_profile_override", currentIndex)
|
||||||
|
if (currentIndex == 1) {
|
||||||
|
// 1 == "Discard and never ask again", so only enable the "Discard" button
|
||||||
|
discardButton.enabled = true
|
||||||
|
keepButton.enabled = false
|
||||||
|
}
|
||||||
|
else if (currentIndex == 2) {
|
||||||
|
// 2 == "Keep and never ask again", so only enable the "Keep" button
|
||||||
|
keepButton.enabled = true
|
||||||
|
discardButton.enabled = false
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// 0 == "Always ask me this", so show both
|
||||||
|
keepButton.enabled = true
|
||||||
|
discardButton.enabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user