mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 21:13:58 -06:00
Adding the preference drop to buildplate while opening Cura project
CURA-10542
This commit is contained in:
parent
e8bdca3dd9
commit
91a84674f0
3 changed files with 16 additions and 79 deletions
|
@ -63,18 +63,6 @@ UM.PreferencesPage
|
|||
}
|
||||
}
|
||||
|
||||
function setDefaultDropDown(code)
|
||||
{
|
||||
for (var i = 0; i < choiceOnDropDown.model.count; ++i)
|
||||
{
|
||||
if (choiceOnDropDown.model.get(i).code == code)
|
||||
{
|
||||
choiceOnDropDown.currentIndex = i
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function reset()
|
||||
{
|
||||
UM.Preferences.resetPreference("general/language")
|
||||
|
@ -525,61 +513,6 @@ UM.PreferencesPage
|
|||
}
|
||||
}
|
||||
|
||||
UM.TooltipArea
|
||||
{
|
||||
width: childrenRect.width
|
||||
height: childrenRect.height
|
||||
text: catalog.i18nc("@info:tooltip", "This setting will set a default (or not) for the Per Model Drop to buildplate feature (Either Always, Never, decide every time")
|
||||
|
||||
Column
|
||||
{
|
||||
spacing: UM.Theme.getSize("narrow_margin").height
|
||||
|
||||
UM.Label
|
||||
{
|
||||
text: catalog.i18nc("@window:text", " Default per model setting for drop to build plate when importing a model: ")
|
||||
}
|
||||
|
||||
Cura.ComboBox
|
||||
{
|
||||
id: choiceOnDropDown
|
||||
width: UM.Theme.getSize("combobox").width
|
||||
height: UM.Theme.getSize("combobox").height
|
||||
|
||||
model: ListModel
|
||||
{
|
||||
id: dropDownOptions
|
||||
|
||||
Component.onCompleted:
|
||||
{
|
||||
append({ text: catalog.i18nc("@option:openProject", "Always"), code: "always" })
|
||||
append({ text: catalog.i18nc("@option:openProject", "Never"), code: "never" })
|
||||
append({ text: catalog.i18nc("@option:openProject", "Always ask me this"), code: "always_ask" })
|
||||
}
|
||||
}
|
||||
textRole: "text"
|
||||
|
||||
currentIndex:
|
||||
{
|
||||
var index = 0;
|
||||
var currentChoice = UM.Preferences.getValue("physics/automatic_drop_down_per_model");
|
||||
for (var i = 0; i < model.count; ++i)
|
||||
{
|
||||
if (model.get(i).code == currentChoice)
|
||||
{
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return index;
|
||||
}
|
||||
|
||||
onActivated: UM.Preferences.setValue("physics/automatic_drop_down_per_model", model.get(index).code)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UM.TooltipArea
|
||||
{
|
||||
width: childrenRect.width;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue