1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-17 14:11:06 +00:00

Hide CollisionShape2D handles when node is not visible in tree.

(cherry picked from commit ef995b222e)
This commit is contained in:
Jean-Michel Bernard
2022-02-11 18:44:17 +01:00
committed by Rémi Verschelde
parent b343660dac
commit cb885e97c5

View File

@@ -326,6 +326,10 @@ bool CollisionShape2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_e
return false; return false;
} }
if (!node->is_visible_in_tree()) {
return false;
}
if (shape_type == -1) { if (shape_type == -1) {
return false; return false;
} }
@@ -448,6 +452,10 @@ void CollisionShape2DEditor::forward_canvas_draw_over_viewport(Control *p_overla
return; return;
} }
if (!node->is_visible_in_tree()) {
return;
}
_get_current_shape_type(); _get_current_shape_type();
if (shape_type == -1) { if (shape_type == -1) {