mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 16:57:51 -06:00
Disable move to mouse position preference in orthogonal view
This commit is contained in:
parent
9236f21d67
commit
7f559987a0
1 changed files with 17 additions and 2 deletions
|
@ -368,14 +368,29 @@ UM.PreferencesPage
|
||||||
{
|
{
|
||||||
width: childrenRect.width;
|
width: childrenRect.width;
|
||||||
height: childrenRect.height;
|
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
|
CheckBox
|
||||||
{
|
{
|
||||||
id: zoomToMouseCheckbox
|
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"))
|
checked: boolCheck(UM.Preferences.getValue("view/zoom_to_mouse"))
|
||||||
onClicked: UM.Preferences.setValue("view/zoom_to_mouse", checked)
|
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…
Add table
Add a link
Reference in a new issue