summaryrefslogtreecommitdiff
path: root/scene/2d/path_2d.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-10-01 14:03:29 +0200
committerGitHub <noreply@github.com>2020-10-01 14:03:29 +0200
commit12091b39d275b15a0aa93b944a670eec8b92d51b (patch)
tree46e2e9a4d1bbd93435f270b6a088287f2515e862 /scene/2d/path_2d.cpp
parent23ab8ea6f62e0859313d282bc68982b05332cadb (diff)
parent9fc2b0fddcaeee3085e42512d7df5c39aec1368c (diff)
Merge pull request #38743 from arrowinaknee/node-config-warnings
Update all get_configuration_warning() to retrieve warnings from the parent
Diffstat (limited to 'scene/2d/path_2d.cpp')
-rw-r--r--scene/2d/path_2d.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/scene/2d/path_2d.cpp b/scene/2d/path_2d.cpp
index f2f549e851..d5994422e7 100644
--- a/scene/2d/path_2d.cpp
+++ b/scene/2d/path_2d.cpp
@@ -254,11 +254,16 @@ String PathFollow2D::get_configuration_warning() const {
return String();
}
+ String warning = Node2D::get_configuration_warning();
+
if (!Object::cast_to<Path2D>(get_parent())) {
- return TTR("PathFollow2D only works when set as a child of a Path2D node.");
+ if (!warning.empty()) {
+ warning += "\n\n";
+ }
+ warning += TTR("PathFollow2D only works when set as a child of a Path2D node.");
}
- return String();
+ return warning;
}
void PathFollow2D::_bind_methods() {