diff options
Diffstat (limited to 'scene/gui/texture_button.cpp')
-rw-r--r-- | scene/gui/texture_button.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scene/gui/texture_button.cpp b/scene/gui/texture_button.cpp index b07a3d7669..dcbb25c41d 100644 --- a/scene/gui/texture_button.cpp +++ b/scene/gui/texture_button.cpp @@ -30,7 +30,6 @@ #include "texture_button.h" -#include "core/core_string_names.h" #include "core/typedefs.h" #include <stdlib.h> @@ -353,12 +352,12 @@ void TextureButton::_set_texture(Ref<Texture2D> *p_destination, const Ref<Textur return; } if (destination.is_valid()) { - destination->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &TextureButton::_texture_changed)); + destination->disconnect_changed(callable_mp(this, &TextureButton::_texture_changed)); } destination = p_texture; if (destination.is_valid()) { // Pass `CONNECT_REFERENCE_COUNTED` to avoid early disconnect in case the same texture is assigned to different "slots". - destination->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &TextureButton::_texture_changed), CONNECT_REFERENCE_COUNTED); + destination->connect_changed(callable_mp(this, &TextureButton::_texture_changed), CONNECT_REFERENCE_COUNTED); } _texture_changed(); } |