summaryrefslogtreecommitdiffstats
path: root/scene/2d
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-10-22 06:56:34 -0400
committerSpartan322 <Megacake1234@gmail.com>2024-10-22 06:56:34 -0400
commit9a93ab2506a3544bf48ef1c2b2d7e3d6f0dffedb (patch)
tree961ebbb6fed86a794ff4446a848a359a6cd3fd4e /scene/2d
parent9a49cab65c8e8ed8ac5f0613d96ddde403d12728 (diff)
parentb3bcb2dc14691f7729984128dca26a844f662fa1 (diff)
downloadredot-engine-9a93ab2506a3544bf48ef1c2b2d7e3d6f0dffedb.tar.gz
Merge commit godotengine/godot@b3bcb2dc14691f7729984128dca26a844f662fa1
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/path_2d.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index 70fbbd12e5..3a736f9e17 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -169,17 +169,16 @@ void Path2D::_curve_changed() {
return;
}
- if (!Engine::get_singleton()->is_editor_hint() && !get_tree()->is_debugging_paths_hint()) {
- return;
- }
-
- queue_redraw();
for (int i = 0; i < get_child_count(); i++) {
PathFollow2D *follow = Object::cast_to<PathFollow2D>(get_child(i));
if (follow) {
follow->path_changed();
}
}
+
+ if (Engine::get_singleton()->is_editor_hint() || get_tree()->is_debugging_paths_hint()) {
+ queue_redraw();
+ }
}
void Path2D::set_curve(const Ref<Curve2D> &p_curve) {