diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-06 10:23:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-06 10:23:31 +0100 |
commit | 449656bcbbcd1db314d9e98820240032451484fa (patch) | |
tree | 5f0d439e86a9d8d8246807fdd061a65478c97f1f | |
parent | 309d9ecf6835e513d913f6c440dc49f74d48caf5 (diff) | |
parent | 00d578ba3e44f38c8d65715a590b05592f6c148d (diff) |
Merge pull request #35867 from timothyqiu/path-update
Updates Path2D in debugging if navigation is visible
-rw-r--r-- | scene/2d/path_2d.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index 6ae008548e..ef7c343c1a 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 (!Engine::get_singleton()->is_editor_hint() && !get_tree()->is_debugging_navigation_hint()) { + return; + } - if (is_inside_tree() && Engine::get_singleton()->is_editor_hint()) - update(); + update(); } void Path2D::set_curve(const Ref<Curve2D> &p_curve) { |