mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 21:13:58 -06:00
Add a preference to change LayerView top layers between 1 and 5
Fixes CURA-1643
This commit is contained in:
parent
5873f1d4d0
commit
070e791b94
2 changed files with 42 additions and 1 deletions
|
@ -19,6 +19,7 @@ UM.PreferencesPage
|
|||
{
|
||||
UM.Preferences.resetPreference("view/show_overhang");
|
||||
UM.Preferences.resetPreference("view/center_on_select");
|
||||
UM.Preferences.resetPreference("view/top_layer_count");
|
||||
}
|
||||
|
||||
Column
|
||||
|
@ -57,12 +58,38 @@ UM.PreferencesPage
|
|||
}
|
||||
}
|
||||
|
||||
UM.TooltipArea {
|
||||
width: childrenRect.width;
|
||||
height: childrenRect.height;
|
||||
text: catalog.i18nc("@info:tooltip","Displays")
|
||||
|
||||
CheckBox
|
||||
{
|
||||
id: topLayerCheckbox
|
||||
text: catalog.i18nc("@action:button","Display five top layers in layer view.");
|
||||
checked: UM.Preferences.getValue("view/top_layer_count") == 5
|
||||
onClicked:
|
||||
{
|
||||
if(UM.Preferences.getValue("view/top_layer_count") == 5)
|
||||
{
|
||||
UM.Preferences.setValue("view/top_layer_count", 1)
|
||||
}
|
||||
else
|
||||
{
|
||||
UM.Preferences.setValue("view/top_layer_count", 5)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: UM.Preferences
|
||||
onPreferenceChanged:
|
||||
{
|
||||
overhangCheckbox.checked = boolCheck(UM.Preferences.getValue("view/show_overhang"))
|
||||
centerCheckbox.checked = boolCheck(UM.Preferences.getValue("view/center_on_select"))
|
||||
topLayerCheckbox = UM.Preferences.getValue("view/top_layer_count") == 5
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue