From f7523827cd7f2f87c1da116a0cb25c86f9960bf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82?= Date: Thu, 19 Mar 2026 21:59:33 +0100 Subject: [PATCH] Call stop after setting new sprite frames --- scene/2d/animated_sprite_2d.cpp | 2 +- scene/3d/sprite_3d.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/2d/animated_sprite_2d.cpp b/scene/2d/animated_sprite_2d.cpp index 27d17fa0b6..ebb091f58e 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 510344e395..ebe44c0469 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();