Skip to content

Commit

Permalink
Hide CollisionShape2D handles when node is not visible in tree.
Browse files Browse the repository at this point in the history
(cherry picked from commit ef995b2)
  • Loading branch information
jmb462 authored and akien-mga committed Feb 15, 2022
1 parent b343660 commit cb885e9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions editor/plugins/collision_shape_2d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ bool CollisionShape2DEditor::forward_canvas_gui_input(const Ref<InputEvent> &p_e
return false;
}

if (!node->is_visible_in_tree()) {
return false;
}

if (shape_type == -1) {
return false;
}
Expand Down Expand Up @@ -448,6 +452,10 @@ void CollisionShape2DEditor::forward_canvas_draw_over_viewport(Control *p_overla
return;
}

if (!node->is_visible_in_tree()) {
return;
}

_get_current_shape_type();

if (shape_type == -1) {
Expand Down

0 comments on commit cb885e9

Please sign in to comment.