Updates Path2D in debugging if navigation is visible

This commit is contained in:
Haoyu Qiu 2020-02-03 13:59:13 +08:00
parent 0edcb8ed58
commit 00d578ba3e

View file

@ -120,9 +120,15 @@ void Path2D::_notification(int p_what) {
} }
void Path2D::_curve_changed() { void Path2D::_curve_changed() {
if (!is_inside_tree()) {
return;
}
if (is_inside_tree() && Engine::get_singleton()->is_editor_hint()) if (!Engine::get_singleton()->is_editor_hint() && !get_tree()->is_debugging_navigation_hint()) {
update(); return;
}
update();
} }
void Path2D::set_curve(const Ref<Curve2D> &p_curve) { void Path2D::set_curve(const Ref<Curve2D> &p_curve) {