mirror of https://github.com/godotengine/godot
Merge pull request #111398 from xuhuisheng/dev/anim_length
Set step before set value, to fix animation length issue
This commit is contained in:
commit
58c124fd97
|
|
@ -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)"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue