mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Add preference to set the camera rendering type
CURA-5395
This commit is contained in:
parent
2f5dfb8e65
commit
65a8582a1e
1 changed files with 52 additions and 2 deletions
|
@ -95,6 +95,10 @@ UM.PreferencesPage
|
||||||
UM.Preferences.resetPreference("view/top_layer_count");
|
UM.Preferences.resetPreference("view/top_layer_count");
|
||||||
topLayerCountCheckbox.checked = boolCheck(UM.Preferences.getValue("view/top_layer_count"))
|
topLayerCountCheckbox.checked = boolCheck(UM.Preferences.getValue("view/top_layer_count"))
|
||||||
|
|
||||||
|
UM.Preferences.resetPreference("general/camera_perspective_mode")
|
||||||
|
var defaultCameraMode = UM.Preferences.getValue("general/camera_perspective_mode")
|
||||||
|
setDefaultCameraMode(defaultCameraMode)
|
||||||
|
|
||||||
UM.Preferences.resetPreference("cura/choice_on_profile_override")
|
UM.Preferences.resetPreference("cura/choice_on_profile_override")
|
||||||
setDefaultDiscardOrKeepProfile(UM.Preferences.getValue("cura/choice_on_profile_override"))
|
setDefaultDiscardOrKeepProfile(UM.Preferences.getValue("cura/choice_on_profile_override"))
|
||||||
|
|
||||||
|
@ -330,7 +334,8 @@ UM.PreferencesPage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.TooltipArea {
|
UM.TooltipArea
|
||||||
|
{
|
||||||
width: childrenRect.width;
|
width: childrenRect.width;
|
||||||
height: childrenRect.height;
|
height: childrenRect.height;
|
||||||
text: catalog.i18nc("@info:tooltip", "Moves the camera so the model is in the center of the view when a model is selected")
|
text: catalog.i18nc("@info:tooltip", "Moves the camera so the model is in the center of the view when a model is selected")
|
||||||
|
@ -344,7 +349,8 @@ UM.PreferencesPage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.TooltipArea {
|
UM.TooltipArea
|
||||||
|
{
|
||||||
width: childrenRect.width;
|
width: childrenRect.width;
|
||||||
height: childrenRect.height;
|
height: childrenRect.height;
|
||||||
text: catalog.i18nc("@info:tooltip", "Should the default zoom behavior of cura be inverted?")
|
text: catalog.i18nc("@info:tooltip", "Should the default zoom behavior of cura be inverted?")
|
||||||
|
@ -436,6 +442,50 @@ UM.PreferencesPage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UM.TooltipArea
|
||||||
|
{
|
||||||
|
width: childrenRect.width
|
||||||
|
height: childrenRect.height
|
||||||
|
text: catalog.i18nc("@info:tooltip", "What type of camera rendering should be used?")
|
||||||
|
Column
|
||||||
|
{
|
||||||
|
spacing: 4 * screenScaleFactor
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: catalog.i18nc("@window:text", "Camera rendering: ")
|
||||||
|
}
|
||||||
|
ComboBox
|
||||||
|
{
|
||||||
|
id: cameraComboBox
|
||||||
|
|
||||||
|
model: ListModel
|
||||||
|
{
|
||||||
|
id: comboBoxList
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
append({ text: catalog.i18n("Perspective"), code: "perspective" })
|
||||||
|
append({ text: catalog.i18n("Orthogonal"), code: "orthogonal" })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
currentIndex:
|
||||||
|
{
|
||||||
|
var code = UM.Preferences.getValue("general/camera_perspective_mode");
|
||||||
|
for(var i = 0; i < comboBoxList.count; ++i)
|
||||||
|
{
|
||||||
|
if(model.get(i).code == code)
|
||||||
|
{
|
||||||
|
return i
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
onActivated: UM.Preferences.setValue("general/camera_perspective_mode", model.get(index).code)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
//: Spacer
|
//: Spacer
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue