You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-23 15:16:17 +00:00
Hide Polygon2D lines and handles when node is not visible in tree.
(cherry picked from commit b0ebbd8ece)
This commit is contained in:
committed by
Rémi Verschelde
parent
cb885e97c5
commit
9b7147157d
@@ -273,6 +273,10 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!_get_node()->is_visible_in_tree()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Ref<InputEventMouseButton> mb = p_event;
|
||||
|
||||
if (!_has_resource()) {
|
||||
@@ -506,6 +510,10 @@ void AbstractPolygon2DEditor::forward_canvas_draw_over_viewport(Control *p_overl
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_get_node()->is_visible_in_tree()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Transform2D xform = canvas_item_editor->get_canvas_transform() * _get_node()->get_global_transform();
|
||||
// All polygon points are sharp, so use the sharp handle icon
|
||||
const Ref<Texture> handle = get_icon("EditorPathSharpHandle", "EditorIcons");
|
||||
|
||||
Reference in New Issue
Block a user