From 14bed692bf64adda57c79ed6e7d995457f393da0 Mon Sep 17 00:00:00 2001 From: smix8 <52464204+smix8@users.noreply.github.com> Date: Mon, 10 Jun 2024 19:32:06 +0200 Subject: [PATCH] Fix NavigationRegion2D clear button not updating debug visuals Fixes that NavigationRegion2D editor plugin clear button did not update the debug visuals. --- editor/plugins/navigation_polygon_editor_plugin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp index 8926f612a28..ec59bbb5439 100644 --- a/editor/plugins/navigation_polygon_editor_plugin.cpp +++ b/editor/plugins/navigation_polygon_editor_plugin.cpp @@ -217,6 +217,8 @@ void NavigationPolygonEditor::_clear_pressed() { if (node) { if (node->get_navigation_polygon().is_valid()) { node->get_navigation_polygon()->clear(); + // Needed to update all the region internals. + node->set_navigation_polygon(node->get_navigation_polygon()); } }