summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorHendrik Brucker <hendrik.brucker@mail.de>2022-04-19 19:51:49 +0200
committerHendrik Brucker <hendrik.brucker@mail.de>2022-04-19 19:51:49 +0200
commit39a4036aa294d634c32c2ad2ecde955ca57373ce (patch)
tree3a837dc026ea53944a1574f4242f9cb83c1b6f85 /scene/resources
parent690fefe43ee74c0ae3ed5642f3aefbeb711f9d1c (diff)
Fix GradientTexture2D update after setting the gradient
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/texture.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 4c20e07976..14abe13afa 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -2278,6 +2278,8 @@ Ref<Image> GradientTexture1D::get_image() const {
return RenderingServer::get_singleton()->texture_2d_get(texture);
}
+//////////////////
+
GradientTexture2D::GradientTexture2D() {
_queue_update();
}
@@ -2299,7 +2301,8 @@ void GradientTexture2D::set_gradient(Ref<Gradient> p_gradient) {
if (gradient.is_valid()) {
gradient->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &GradientTexture2D::_queue_update));
}
- _queue_update();
+ _update();
+ emit_changed();
}
Ref<Gradient> GradientTexture2D::get_gradient() const {