summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorTomasz Chabora <kobewi4e@gmail.com>2019-05-23 20:40:52 +0200
committerTomasz Chabora <kobewi4e@gmail.com>2019-05-24 13:10:21 +0200
commit5e9400b2e3f4d54d1c8f7227c01580276de2bbdb (patch)
treeb96960774b596483cab5ce7b88c1d0b36ba991e5 /scene/2d
parent7c73a741f3bb1fd598b6443cb9f8d8e10fb9f36f (diff)
Don't modulate canvas on invisible color change
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/canvas_modulate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/canvas_modulate.cpp b/scene/2d/canvas_modulate.cpp
index bd7bb97b03..009d664462 100644
--- a/scene/2d/canvas_modulate.cpp
+++ b/scene/2d/canvas_modulate.cpp
@@ -70,7 +70,7 @@ void CanvasModulate::_bind_methods() {
void CanvasModulate::set_color(const Color &p_color) {
color = p_color;
- if (is_inside_tree()) {
+ if (is_visible_in_tree()) {
VS::get_singleton()->canvas_set_modulate(get_canvas(), color);
}
}