summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSilc Lizard (Tokage) Renew <61938263+TokageItLab@users.noreply.github.com>2024-07-13 14:27:01 +0900
committerSilc Lizard (Tokage) Renew <61938263+TokageItLab@users.noreply.github.com>2024-07-13 14:27:01 +0900
commitb326a357477ecac068419e7f7440953b292108b7 (patch)
tree423b60f39720e18d5c0b24a2035483376285178b
parent97b8ad1af0f2b4a216f6f1263bef4fbc69e56c7b (diff)
downloadredot-engine-b326a357477ecac068419e7f7440953b292108b7.tar.gz
Reset position to 0 after animation selected on AnimationPlayerEditor
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 02fa582da4..5d60de973a 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -345,6 +345,7 @@ void AnimationPlayerEditor::_animation_selected(int p_which) {
}
frame->set_max((double)anim->get_length());
autoplay->set_pressed(current == player->get_autoplay());
+ player->stop();
} else {
track_editor->set_animation(Ref<Animation>(), true);
track_editor->set_root(nullptr);