summaryrefslogtreecommitdiff
path: root/scene/2d/touch_screen_button.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2023-05-19 08:40:25 +0200
committerGitHub <noreply@github.com>2023-05-19 08:40:25 +0200
commit138882742a95366c833b54035ad58a5764856ffa (patch)
treec8b4e6735ad51daf8c5804463be83ced3700b081 /scene/2d/touch_screen_button.cpp
parent60e8a06d4eec393d0a2fc277bd66f080f55333b6 (diff)
parent5fe254e8f681f400f2ebab187486998f499387f9 (diff)
Merge pull request #77202 from YuriSizov/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.3) - 5th batch
Diffstat (limited to 'scene/2d/touch_screen_button.cpp')
-rw-r--r--scene/2d/touch_screen_button.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/touch_screen_button.cpp b/scene/2d/touch_screen_button.cpp
index 4c8c4f1e16..7da2fc3cb3 100644
--- a/scene/2d/touch_screen_button.cpp
+++ b/scene/2d/touch_screen_button.cpp
@@ -42,7 +42,7 @@ void TouchScreenButton::set_texture_normal(const Ref<Texture2D> &p_texture) {
}
texture_normal = p_texture;
if (texture_normal.is_valid()) {
- texture_normal->connect(SceneStringNames::get_singleton()->changed, callable_mp((CanvasItem *)this, &CanvasItem::queue_redraw));
+ texture_normal->connect(SceneStringNames::get_singleton()->changed, callable_mp((CanvasItem *)this, &CanvasItem::queue_redraw), CONNECT_REFERENCE_COUNTED);
}
queue_redraw();
}
@@ -60,7 +60,7 @@ void TouchScreenButton::set_texture_pressed(const Ref<Texture2D> &p_texture_pres
}
texture_pressed = p_texture_pressed;
if (texture_pressed.is_valid()) {
- texture_pressed->connect(SceneStringNames::get_singleton()->changed, callable_mp((CanvasItem *)this, &CanvasItem::queue_redraw));
+ texture_pressed->connect(SceneStringNames::get_singleton()->changed, callable_mp((CanvasItem *)this, &CanvasItem::queue_redraw), CONNECT_REFERENCE_COUNTED);
}
queue_redraw();
}