summaryrefslogtreecommitdiff
path: root/scene/main/viewport.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/main/viewport.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/main/viewport.cpp')
-rw-r--r--scene/main/viewport.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 7fefbc3f3c..5e91e4fe42 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -3093,10 +3093,15 @@ String Viewport::get_configuration_warning() const {
return TTR("This viewport is not set as render target. If you intend for it to display its contents directly to the screen, make it a child of a Control so it can obtain a size. Otherwise, make it a RenderTarget and assign its internal texture to some node for display.");
}*/
+ String warning = Node::get_configuration_warning();
+
if (size.x == 0 || size.y == 0) {
- return TTR("Viewport size must be greater than 0 to render anything.");
+ if (!warning.empty()) {
+ warning += "\n\n";
+ }
+ warning += TTR("Viewport size must be greater than 0 to render anything.");
}
- return String();
+ return warning;
}
void Viewport::gui_reset_canvas_sort_index() {