mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 18:57:52 -06:00
Move legacy options to layerview options
This commit is contained in:
parent
88bbadead8
commit
61e0cd4ff5
2 changed files with 20 additions and 40 deletions
|
@ -223,6 +223,8 @@ Item
|
|||
view_settings.show_adhesion = UM.Preferences.getValue("layerview/show_adhesion");
|
||||
view_settings.show_skin = UM.Preferences.getValue("layerview/show_skin");
|
||||
view_settings.show_infill = UM.Preferences.getValue("layerview/show_infill");
|
||||
view_settings.only_show_top_layers = UM.Preferences.getValue("view/only_show_top_layers");
|
||||
view_settings.top_layer_count = UM.Preferences.getValue("view/top_layer_count");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -238,6 +240,8 @@ Item
|
|||
property bool show_adhesion: UM.Preferences.getValue("layerview/show_adhesion")
|
||||
property bool show_skin: UM.Preferences.getValue("layerview/show_skin")
|
||||
property bool show_infill: UM.Preferences.getValue("layerview/show_infill")
|
||||
property bool only_show_top_layers: UM.Preferences.getValue("view/only_show_top_layers")
|
||||
property int top_layer_count: UM.Preferences.getValue("view/only_show_top_layers")
|
||||
|
||||
anchors.top: UM.LayerView.compatibilityMode ? compatibilityModeLabel.bottom : layerTypeCombobox.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
|
@ -315,6 +319,22 @@ Item
|
|||
}
|
||||
text: catalog.i18nc("@label", "Show Infill")
|
||||
}
|
||||
CheckBox {
|
||||
checked: view_settings.only_show_top_layers
|
||||
onClicked: {
|
||||
UM.Preferences.setValue("view/only_show_top_layers", checked ? 1.0 : 0.0);
|
||||
}
|
||||
text: catalog.i18nc("@label", "Only Show Top Layers")
|
||||
visible: UM.LayerView.compatibilityMode
|
||||
}
|
||||
CheckBox {
|
||||
checked: view_settings.top_layer_count == 5
|
||||
onClicked: {
|
||||
UM.Preferences.setValue("view/top_layer_count", checked ? 5 : 1);
|
||||
}
|
||||
text: catalog.i18nc("@label", "Show 5 Detailed Layers On Top")
|
||||
visible: UM.LayerView.compatibilityMode
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,8 +45,6 @@ UM.PreferencesPage
|
|||
showOverhangCheckbox.checked = boolCheck(UM.Preferences.getValue("view/show_overhang"))
|
||||
UM.Preferences.resetPreference("view/center_on_select");
|
||||
centerOnSelectCheckbox.checked = boolCheck(UM.Preferences.getValue("view/center_on_select"))
|
||||
UM.Preferences.resetPreference("view/top_layer_count");
|
||||
topLayerCountCheckbox.checked = boolCheck(UM.Preferences.getValue("view/top_layer_count"))
|
||||
|
||||
if (plugins.find("id", "SliceInfoPlugin") > -1) {
|
||||
UM.Preferences.resetPreference("info/send_slice_info")
|
||||
|
@ -232,44 +230,6 @@ UM.PreferencesPage
|
|||
}
|
||||
}
|
||||
|
||||
UM.TooltipArea {
|
||||
width: childrenRect.width;
|
||||
height: childrenRect.height;
|
||||
text: catalog.i18nc("@info:tooltip","Display 5 top layers in layer view or only the top-most layer. Rendering 5 layers takes longer, but may show more information.")
|
||||
|
||||
CheckBox
|
||||
{
|
||||
id: topLayerCountCheckbox
|
||||
text: catalog.i18nc("@action:button","Display five top layers in layer view compatibility mode");
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UM.TooltipArea {
|
||||
width: childrenRect.width
|
||||
height: childrenRect.height
|
||||
text: catalog.i18nc("@info:tooltip", "Should only the top layers be displayed in layerview?")
|
||||
|
||||
CheckBox
|
||||
{
|
||||
id: topLayersOnlyCheckbox
|
||||
text: catalog.i18nc("@option:check", "Only display top layer(s) in layer view compatibility mode")
|
||||
checked: boolCheck(UM.Preferences.getValue("view/only_show_top_layers"))
|
||||
onCheckedChanged: UM.Preferences.setValue("view/only_show_top_layers", checked)
|
||||
}
|
||||
}
|
||||
|
||||
UM.TooltipArea {
|
||||
width: childrenRect.width
|
||||
height: childrenRect.height
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue