From e31bb5ffeb279f704cff1963c2650df7ad3ecdd6 Mon Sep 17 00:00:00 2001 From: Micky Date: Sat, 13 Aug 2022 23:21:24 +0200 Subject: Rename `CanvasItem.update()` to `queue_redraw()` Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on. Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency. Just a few comments have also been changed to say "redraw". In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`. --- scene/2d/navigation_region_2d.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scene/2d/navigation_region_2d.cpp') diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp index 00aa4b0b59..ffccb95a22 100644 --- a/scene/2d/navigation_region_2d.cpp +++ b/scene/2d/navigation_region_2d.cpp @@ -374,7 +374,7 @@ void NavigationRegion2D::set_enabled(bool p_enabled) { #ifdef DEBUG_ENABLED if (Engine::get_singleton()->is_editor_hint() || NavigationServer3D::get_singleton()->get_debug_enabled()) { - update(); + queue_redraw(); } #endif // DEBUG_ENABLED } @@ -551,7 +551,7 @@ Ref NavigationRegion2D::get_navigation_polygon() const { void NavigationRegion2D::_navpoly_changed() { if (is_inside_tree() && (Engine::get_singleton()->is_editor_hint() || get_tree()->is_debugging_navigation_hint())) { - update(); + queue_redraw(); } if (navpoly.is_valid()) { NavigationServer2D::get_singleton()->region_set_navpoly(region, navpoly); @@ -561,7 +561,7 @@ void NavigationRegion2D::_navpoly_changed() { void NavigationRegion2D::_map_changed(RID p_map) { #ifdef DEBUG_ENABLED if (is_inside_tree() && get_world_2d()->get_navigation_map() == p_map) { - update(); + queue_redraw(); } #endif // DEBUG_ENABLED } -- cgit v1.2.3