Skip to content

Commit 3c3303e

Browse files
committed
Merge pull request godotengine#98031 from MajorMcDoom/anim-curve-zoom-fix
Fix inverted vertical zoom interaction in animation curve editor
2 parents b1526f4 + 77c444b commit 3c3303e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

editor/animation_bezier_editor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1650,7 +1650,7 @@ void AnimationBezierTrackEdit::_zoom_callback(float p_zoom_factor, Vector2 p_ori
16501650
Ref<InputEventWithModifiers> iewm = p_event;
16511651
if (iewm.is_valid() && iewm->is_alt_pressed()) {
16521652
// Alternate zoom (doesn't affect timeline).
1653-
timeline_v_zoom = CLAMP(timeline_v_zoom * p_zoom_factor, 0.000001, 100000);
1653+
timeline_v_zoom = CLAMP(timeline_v_zoom / p_zoom_factor, 0.000001, 100000);
16541654
} else {
16551655
float zoom_factor = p_zoom_factor > 1.0 ? AnimationTimelineEdit::SCROLL_ZOOM_FACTOR_IN : AnimationTimelineEdit::SCROLL_ZOOM_FACTOR_OUT;
16561656
timeline->_zoom_callback(zoom_factor, p_origin, p_event);

0 commit comments

Comments
 (0)