diff --git a/scene/2d/animated_sprite_2d.cpp b/scene/2d/animated_sprite_2d.cpp index 27d17fa0b6a6..ebb091f58e45 100644 --- a/scene/2d/animated_sprite_2d.cpp +++ b/scene/2d/animated_sprite_2d.cpp @@ -316,7 +316,6 @@ void AnimatedSprite2D::set_sprite_frames(const Ref &p_frames) { if (frames.is_valid()) { frames->disconnect(CoreStringName(changed), callable_mp(this, &AnimatedSprite2D::_res_changed)); } - stop(); frames = p_frames; if (frames.is_valid()) { frames->connect(CoreStringName(changed), callable_mp(this, &AnimatedSprite2D::_res_changed)); @@ -335,6 +334,7 @@ void AnimatedSprite2D::set_sprite_frames(const Ref &p_frames) { } } } + stop(); notify_property_list_changed(); queue_redraw(); diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index 510344e3952d..ebe44c04692b 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -1217,7 +1217,6 @@ void AnimatedSprite3D::set_sprite_frames(const Ref &p_frames) { if (frames.is_valid()) { frames->disconnect(CoreStringName(changed), callable_mp(this, &AnimatedSprite3D::_res_changed)); } - stop(); frames = p_frames; if (frames.is_valid()) { frames->connect(CoreStringName(changed), callable_mp(this, &AnimatedSprite3D::_res_changed)); @@ -1236,6 +1235,7 @@ void AnimatedSprite3D::set_sprite_frames(const Ref &p_frames) { } } } + stop(); notify_property_list_changed(); _queue_redraw();