Pārlūkot izejas kodu

Fix NavigationRegion2D clear button not updating debug visuals

Fixes that NavigationRegion2D editor plugin clear button did not update the debug visuals.
smix8 1 gadu atpakaļ
vecāks
revīzija
14bed692bf
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      editor/plugins/navigation_polygon_editor_plugin.cpp

+ 2 - 0
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());
 		}
 	}