1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-03 16:55:53 +00:00

set step before set value, to fix animation length issue

This commit is contained in:
xuhuisheng
2025-10-08 15:07:32 +08:00
parent d61cd9149a
commit d0ad6d6023

View File

@@ -1836,8 +1836,8 @@ void AnimationTimelineEdit::update_values() {
editing = true;
if (use_fps && animation->get_step() > 0.0) {
length->set_value(animation->get_length() / animation->get_step());
length->set_step(FPS_DECIMAL);
length->set_value(animation->get_length() / animation->get_step());
length->set_tooltip_text(TTR("Animation length (frames)"));
time_icon->set_tooltip_text(TTR("Animation length (frames)"));
if (track_edit) {
@@ -1845,8 +1845,8 @@ void AnimationTimelineEdit::update_values() {
track_edit->editor->marker_edit->_update_key_edit();
}
} else {
length->set_value(animation->get_length());
length->set_step(SECOND_DECIMAL);
length->set_value(animation->get_length());
length->set_tooltip_text(TTR("Animation length (seconds)"));
time_icon->set_tooltip_text(TTR("Animation length (seconds)"));
}