mirror of https://github.com/godotengine/godot
Stop drawing of MarginContainer margins if not in tree
Use `is_visible_in_tree()` as per KoBeWi's suggestion
This commit is contained in:
parent
0b5ad6c73c
commit
a48353b1c6
|
|
@ -51,7 +51,7 @@ bool MarginContainerEditorPlugin::handles(Object *p_object) const {
|
|||
}
|
||||
|
||||
void MarginContainerEditorPlugin::forward_canvas_draw_over_viewport(Control *p_viewport_control) {
|
||||
if (!margin_container) {
|
||||
if (!margin_container || !margin_container->is_visible_in_tree()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue