diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-11-04 12:48:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-04 12:48:14 +0100 |
commit | 86da206b84e107585deddfebc2c311c9dcc10795 (patch) | |
tree | 24156255de4e155396a0742e790a82d5f88d8322 /editor | |
parent | 83409bac0e3a4bf9d31100fd42afa8dfe7df21b5 (diff) | |
parent | e3cfb006a0563dbf0637033754a2b4104b897421 (diff) |
Merge pull request #33331 from KoBeWi/just_keep_panning
Allow zooming while panning
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 119c61deb1..afebe2ba47 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -1227,8 +1227,8 @@ bool CanvasItemEditor::_gui_input_zoom_or_pan(const Ref<InputEvent> &p_event, bo } if (panning) { - if (!b->is_pressed()) { - // Stop panning the viewport (for any mouse button press) + if (!b->is_pressed() && (pan_on_scroll || (b->get_button_index() != BUTTON_WHEEL_DOWN && b->get_button_index() != BUTTON_WHEEL_UP))) { + // Stop panning the viewport (for any mouse button press except zooming) panning = false; } } |