diff options
Diffstat (limited to 'scene/2d/path_2d.cpp')
-rw-r--r-- | scene/2d/path_2d.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp index 6ae008548e..d83c163b4c 100644 --- a/scene/2d/path_2d.cpp +++ b/scene/2d/path_2d.cpp @@ -112,7 +112,7 @@ void Path2D::_notification(int p_what) { real_t frac = j / 8.0; Vector2 p = curve->interpolate(i, frac); - draw_line(prev_p, p, color, line_width, true); + draw_line(prev_p, p, color, line_width); prev_p = p; } } @@ -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) { |