mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 11:45:55 +08:00
Disable move to mouse position preference in orthogonal view
This commit is contained in:
parent
9236f21d67
commit
7f559987a0
@ -368,14 +368,29 @@ UM.PreferencesPage
|
||||
{
|
||||
width: childrenRect.width;
|
||||
height: childrenRect.height;
|
||||
text: catalog.i18nc("@info:tooltip", "Should zooming move in the direction of the mouse?")
|
||||
text: zoomToMouseCheckbox.enabled ? catalog.i18nc("@info:tooltip", "Should zooming move in the direction of the mouse?") : catalog.i18nc("@info:tooltip", "Zooming towards the mouse is not supported in the orthogonal perspective.")
|
||||
|
||||
CheckBox
|
||||
{
|
||||
id: zoomToMouseCheckbox
|
||||
text: catalog.i18nc("@action:button", "Zoom toward mouse direction");
|
||||
text: catalog.i18nc("@action:button", "Zoom toward mouse direction")
|
||||
checked: boolCheck(UM.Preferences.getValue("view/zoom_to_mouse"))
|
||||
onClicked: UM.Preferences.setValue("view/zoom_to_mouse", checked)
|
||||
enabled: UM.Preferences.getValue("general/camera_perspective_mode") !== "orthogonal"
|
||||
}
|
||||
|
||||
//Because there is no signal for individual preferences, we need to manually link to the onPreferenceChanged signal.
|
||||
Connections
|
||||
{
|
||||
target: UM.Preferences
|
||||
onPreferenceChanged:
|
||||
{
|
||||
if(preference != "general/camera_perspective_mode")
|
||||
{
|
||||
return;
|
||||
}
|
||||
zoomToMouseCheckbox.enabled = UM.Preferences.getValue("general/camera_perspective_mode") !== "orthogonal";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user