1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Fix zoom in/out keyboard shortcuts not working since the introduction of EditorZoomWidget. Add KP shortcuts to zoom in/out.

This commit is contained in:
Eric M
2022-03-24 23:03:43 +10:00
parent f74491fdee
commit 16a3cec71e
5 changed files with 13 additions and 3 deletions

View File

@@ -5058,6 +5058,7 @@ CanvasItemEditor::CanvasItemEditor() {
zoom_widget = memnew(EditorZoomWidget);
controls_vb->add_child(zoom_widget);
zoom_widget->set_anchors_and_offsets_preset(Control::PRESET_TOP_LEFT, Control::PRESET_MODE_MINSIZE, 2 * EDSCALE);
zoom_widget->set_shortcut_context(this);
zoom_widget->connect("zoom_changed", callable_mp(this, &CanvasItemEditor::_update_zoom));
panner.instantiate();