Don't modulate canvas on invisible color change
(cherry picked from commit 5e9400b2e3
)
This commit is contained in:
parent
aacefcb7dc
commit
7431d3c3c0
|
@ -70,7 +70,7 @@ void CanvasModulate::_bind_methods() {
|
||||||
void CanvasModulate::set_color(const Color &p_color) {
|
void CanvasModulate::set_color(const Color &p_color) {
|
||||||
|
|
||||||
color = p_color;
|
color = p_color;
|
||||||
if (is_inside_tree()) {
|
if (is_visible_in_tree()) {
|
||||||
VS::get_singleton()->canvas_set_modulate(get_canvas(), color);
|
VS::get_singleton()->canvas_set_modulate(get_canvas(), color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue