From 7431d3c3c00ac2fef82949abf88920f55745f8b8 Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Thu, 23 May 2019 20:40:52 +0200 Subject: [PATCH] Don't modulate canvas on invisible color change (cherry picked from commit 5e9400b2e3f4d54d1c8f7227c01580276de2bbdb) --- scene/2d/canvas_modulate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/2d/canvas_modulate.cpp b/scene/2d/canvas_modulate.cpp index bd7bb97b039..009d6644629 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); } }