diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-08-25 21:44:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 21:44:31 +0200 |
commit | 060d0ce88204f9180beb3764048975e9dcf5c496 (patch) | |
tree | 4b8753eabdc0a5bf0b2c8124a1fdb2de3dcf0517 /scene | |
parent | ce78d280b39e1e6d0cd700ff10a512acdfaf4282 (diff) | |
parent | d567369c8fa9bf801977c7e728ece65fcb6cfa64 (diff) |
Merge pull request #53299 from Calinou/viewport-tweak-configuration-warning
Diffstat (limited to 'scene')
-rw-r--r-- | scene/main/viewport.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 764fc60bc1..36cc8ebfa2 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -798,6 +798,7 @@ void Viewport::_set_size(const Size2i &p_size, const Size2i &p_size_2d_override, RS::get_singleton()->viewport_set_size(viewport, 0, 0); } _update_global_transform(); + update_configuration_warnings(); update_canvas_items(); @@ -2853,8 +2854,8 @@ Variant Viewport::gui_get_drag_data() const { TypedArray<String> Viewport::get_configuration_warnings() const { TypedArray<String> warnings = Node::get_configuration_warnings(); - if (size.x == 0 || size.y == 0) { - warnings.push_back(RTR("Viewport size must be greater than 0 to render anything.")); + if (size.x <= 1 || size.y <= 1) { + warnings.push_back(RTR("The Viewport size must be greater than or equal to 2 pixels on both dimensions to render anything.")); } return warnings; } |