mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 05:04:10 +00:00
Merge pull request #98031 from MajorMcDoom/anim-curve-zoom-fix
Fix inverted vertical zoom interaction in animation curve editor
This commit is contained in:
commit
3c3303e0a4
@ -1650,7 +1650,7 @@ void AnimationBezierTrackEdit::_zoom_callback(float p_zoom_factor, Vector2 p_ori
|
||||
Ref<InputEventWithModifiers> iewm = p_event;
|
||||
if (iewm.is_valid() && iewm->is_alt_pressed()) {
|
||||
// Alternate zoom (doesn't affect timeline).
|
||||
timeline_v_zoom = CLAMP(timeline_v_zoom * p_zoom_factor, 0.000001, 100000);
|
||||
timeline_v_zoom = CLAMP(timeline_v_zoom / p_zoom_factor, 0.000001, 100000);
|
||||
} else {
|
||||
float zoom_factor = p_zoom_factor > 1.0 ? AnimationTimelineEdit::SCROLL_ZOOM_FACTOR_IN : AnimationTimelineEdit::SCROLL_ZOOM_FACTOR_OUT;
|
||||
timeline->_zoom_callback(zoom_factor, p_origin, p_event);
|
||||
|
Loading…
Reference in New Issue
Block a user