You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Merge pull request #68879 from TokageItLab/fix-bezier-editor-focus-mode
Fix the behavior of focus selection in bezier editor
This commit is contained in:
@@ -903,11 +903,17 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
|
|||||||
}
|
}
|
||||||
float zoom_value = timeline->get_zoom()->get_max() - zv;
|
float zoom_value = timeline->get_zoom()->get_max() - zv;
|
||||||
|
|
||||||
|
if (Math::is_finite(minimum_time) && Math::is_finite(maximum_time) && maximum_time - minimum_time > CMP_EPSILON) {
|
||||||
timeline->get_zoom()->set_value(zoom_value);
|
timeline->get_zoom()->set_value(zoom_value);
|
||||||
timeline->call_deferred("set_value", minimum_time);
|
timeline->call_deferred("set_value", minimum_time);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Math::is_finite(minimum_value) && Math::is_finite(maximum_value)) {
|
||||||
v_scroll = (maximum_value + minimum_value) / 2.0;
|
v_scroll = (maximum_value + minimum_value) / 2.0;
|
||||||
|
if (maximum_value - minimum_value > CMP_EPSILON) {
|
||||||
v_zoom = (maximum_value - minimum_value) / ((get_size().height - timeline->get_size().height) * 0.9);
|
v_zoom = (maximum_value - minimum_value) / ((get_size().height - timeline->get_size().height) * 0.9);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
queue_redraw();
|
queue_redraw();
|
||||||
accept_event();
|
accept_event();
|
||||||
|
|||||||
Reference in New Issue
Block a user