You've already forked godot
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:
@@ -1836,8 +1836,8 @@ void AnimationTimelineEdit::update_values() {
|
|||||||
|
|
||||||
editing = true;
|
editing = true;
|
||||||
if (use_fps && animation->get_step() > 0.0) {
|
if (use_fps && animation->get_step() > 0.0) {
|
||||||
length->set_value(animation->get_length() / animation->get_step());
|
|
||||||
length->set_step(FPS_DECIMAL);
|
length->set_step(FPS_DECIMAL);
|
||||||
|
length->set_value(animation->get_length() / animation->get_step());
|
||||||
length->set_tooltip_text(TTR("Animation length (frames)"));
|
length->set_tooltip_text(TTR("Animation length (frames)"));
|
||||||
time_icon->set_tooltip_text(TTR("Animation length (frames)"));
|
time_icon->set_tooltip_text(TTR("Animation length (frames)"));
|
||||||
if (track_edit) {
|
if (track_edit) {
|
||||||
@@ -1845,8 +1845,8 @@ void AnimationTimelineEdit::update_values() {
|
|||||||
track_edit->editor->marker_edit->_update_key_edit();
|
track_edit->editor->marker_edit->_update_key_edit();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
length->set_value(animation->get_length());
|
|
||||||
length->set_step(SECOND_DECIMAL);
|
length->set_step(SECOND_DECIMAL);
|
||||||
|
length->set_value(animation->get_length());
|
||||||
length->set_tooltip_text(TTR("Animation length (seconds)"));
|
length->set_tooltip_text(TTR("Animation length (seconds)"));
|
||||||
time_icon->set_tooltip_text(TTR("Animation length (seconds)"));
|
time_icon->set_tooltip_text(TTR("Animation length (seconds)"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user