diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-10-01 14:03:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-01 14:03:29 +0200 |
commit | 12091b39d275b15a0aa93b944a670eec8b92d51b (patch) | |
tree | 46e2e9a4d1bbd93435f270b6a088287f2515e862 /scene/3d/light_3d.cpp | |
parent | 23ab8ea6f62e0859313d282bc68982b05332cadb (diff) | |
parent | 9fc2b0fddcaeee3085e42512d7df5c39aec1368c (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/3d/light_3d.cpp')
-rw-r--r-- | scene/3d/light_3d.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scene/3d/light_3d.cpp b/scene/3d/light_3d.cpp index 2eb12d10fa..46c3f18c38 100644 --- a/scene/3d/light_3d.cpp +++ b/scene/3d/light_3d.cpp @@ -448,7 +448,7 @@ String OmniLight3D::get_configuration_warning() const { String warning = Light3D::get_configuration_warning(); if (!has_shadow() && get_projector().is_valid()) { - if (warning != String()) { + if (!warning.empty()) { warning += "\n\n"; } warning += TTR("Projector texture only works with shadows active."); @@ -482,15 +482,14 @@ String SpotLight3D::get_configuration_warning() const { String warning = Light3D::get_configuration_warning(); if (has_shadow() && get_param(PARAM_SPOT_ANGLE) >= 90.0) { - if (warning != String()) { + if (!warning.empty()) { warning += "\n\n"; } - warning += TTR("A SpotLight3D with an angle wider than 90 degrees cannot cast shadows."); } if (!has_shadow() && get_projector().is_valid()) { - if (warning != String()) { + if (!warning.empty()) { warning += "\n\n"; } warning += TTR("Projector texture only works with shadows active."); |