diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-10-03 11:50:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-03 11:50:33 +0200 |
commit | 14fa87ce92af76c793624ca759cd3627ee1e9d54 (patch) | |
tree | 6db55fe44e4b0d78123a2e370992027c9d43238f | |
parent | de648e552bf651ea465bf9fd4fc9b863e04077a8 (diff) | |
parent | 3cce39c2d37d73124038def2f002cc372ddceb8c (diff) |
Merge pull request #6592 from Hinsbart/anim_zoom
AnimationEditor: zoom using ctrl+wheel
-rw-r--r-- | tools/editor/animation_editor.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp index 2f67df1fc3..a556031e5e 100644 --- a/tools/editor/animation_editor.cpp +++ b/tools/editor/animation_editor.cpp @@ -1933,12 +1933,20 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) { if (mb.button_index==BUTTON_WHEEL_UP && mb.pressed) { - v_scroll->set_val( v_scroll->get_val() - v_scroll->get_page() / 8 ); + if (mb.mod.command) { + zoom->set_val(zoom->get_val() + zoom->get_step()); + } else { + v_scroll->set_val( v_scroll->get_val() - v_scroll->get_page() / 8 ); + } } if (mb.button_index==BUTTON_WHEEL_DOWN && mb.pressed) { - v_scroll->set_val( v_scroll->get_val() + v_scroll->get_page() / 8 ); + if (mb.mod.command) { + zoom->set_val(zoom->get_val() - zoom->get_step()); + } else { + v_scroll->set_val( v_scroll->get_val() + v_scroll->get_page() / 8 ); + } } if (mb.button_index==BUTTON_RIGHT && mb.pressed) { |