Reset the camera origin when uninverting zoom direction

If zoom-to-cursor has been activated the camera origin will end up behind the camera. This resets it.

Fixes #6490.
This commit is contained in:
Ghostkeeper 2019-10-08 13:06:23 +02:00
parent 6ed2b79166
commit f8449796c9
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276

View file

@ -360,7 +360,13 @@ UM.PreferencesPage
id: invertZoomCheckbox
text: catalog.i18nc("@action:button", "Invert the direction of camera zoom.");
checked: boolCheck(UM.Preferences.getValue("view/invert_zoom"))
onClicked: UM.Preferences.setValue("view/invert_zoom", checked)
onClicked: {
if(!checked && zoomToMouseCheckbox.checked) //Fix for Github issue Ultimaker/Cura#6490: Make sure the camera origin is in front when unchecking.
{
UM.Controller.setCameraOrigin("home");
}
UM.Preferences.setValue("view/invert_zoom", checked);
}
}
}