diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-04-27 12:49:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-27 12:49:39 +0200 |
commit | baeb8ad860aa9a14944f206e0aeaf276d6766ed1 (patch) | |
tree | 4077af372edfca7fcf65588f6d0561ba318d9868 /scene | |
parent | 3dd550e1caadd111fa38d0193fb167dec2e155d5 (diff) | |
parent | 39a4036aa294d634c32c2ad2ecde955ca57373ce (diff) |
Merge pull request #60361 from Geometror/fix-gradient-texture-2d-get-image
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/texture.cpp | 5 |
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 { |