From 00d578ba3e44f38c8d65715a590b05592f6c148d Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Mon, 3 Feb 2020 13:59:13 +0800 Subject: [PATCH] Updates Path2D in debugging if navigation is visible --- scene/2d/path_2d.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index 6ae008548e0..ef7c343c1a8 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -120,9 +120,15 @@ void Path2D::_notification(int p_what) { } void Path2D::_curve_changed() { + if (!is_inside_tree()) { + return; + } - if (is_inside_tree() && Engine::get_singleton()->is_editor_hint()) - update(); + if (!Engine::get_singleton()->is_editor_hint() && !get_tree()->is_debugging_navigation_hint()) { + return; + } + + update(); } void Path2D::set_curve(const Ref &p_curve) {