diff options
author | smix8 <52464204+smix8@users.noreply.github.com> | 2024-02-10 02:47:00 +0100 |
---|---|---|
committer | smix8 <52464204+smix8@users.noreply.github.com> | 2024-02-10 03:04:24 +0100 |
commit | c914e634643fa41eba2a47d08e7d0907a28e87e1 (patch) | |
tree | 977fbf5dd99d69a9d9ce4d094b533394610cf0e0 /scene/2d/navigation_region_2d.cpp | |
parent | 4e990cd7e51d17cf24f854cc33b2715eaa27200f (diff) | |
download | redot-engine-c914e634643fa41eba2a47d08e7d0907a28e87e1.tar.gz |
Fix NavigationRegion errors from signal changes
Fixes NavigationRegion errors from signal changes.
Diffstat (limited to 'scene/2d/navigation_region_2d.cpp')
-rw-r--r-- | scene/2d/navigation_region_2d.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scene/2d/navigation_region_2d.cpp b/scene/2d/navigation_region_2d.cpp index 38ca1d98ef..134ca065ce 100644 --- a/scene/2d/navigation_region_2d.cpp +++ b/scene/2d/navigation_region_2d.cpp @@ -275,6 +275,14 @@ void NavigationRegion2D::_navigation_map_changed(RID p_map) { } #endif // DEBUG_ENABLED +#ifdef DEBUG_ENABLED +void NavigationRegion2D::_navigation_debug_changed() { + if (is_inside_tree()) { + queue_redraw(); + } +} +#endif // DEBUG_ENABLED + Array NavigationRegion2D::get_configuration_warnings() const { Array warnings = Node2D::get_configuration_warnings(); @@ -374,7 +382,7 @@ NavigationRegion2D::NavigationRegion2D() { #ifdef DEBUG_ENABLED NavigationServer2D::get_singleton()->connect(SNAME("map_changed"), callable_mp(this, &NavigationRegion2D::_navigation_map_changed)); - NavigationServer2D::get_singleton()->connect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion2D::_navigation_map_changed)); + NavigationServer2D::get_singleton()->connect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion2D::_navigation_debug_changed)); #endif // DEBUG_ENABLED } @@ -391,7 +399,7 @@ NavigationRegion2D::~NavigationRegion2D() { #ifdef DEBUG_ENABLED NavigationServer2D::get_singleton()->disconnect(SNAME("map_changed"), callable_mp(this, &NavigationRegion2D::_navigation_map_changed)); - NavigationServer2D::get_singleton()->disconnect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion2D::_navigation_map_changed)); + NavigationServer2D::get_singleton()->disconnect(SNAME("navigation_debug_changed"), callable_mp(this, &NavigationRegion2D::_navigation_debug_changed)); #endif // DEBUG_ENABLED } |