diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-10-04 11:37:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 11:37:16 +0200 |
commit | 7e5ad362a594d8da41afb37437c1040272b9285c (patch) | |
tree | fbdb63530a0d1b7c1bb3b486a3f1f78d057f0d4b | |
parent | 463dbe52109a50299db7f1e08a3a23f70053fa11 (diff) | |
parent | bd3cc8d6cc4fed201e4e3c552dc364e37b7cff72 (diff) |
Merge pull request #53379 from EricEzaM/fix-script-editor-warnings-tables
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 2b1ca068ee..701d75fb08 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -433,10 +433,12 @@ void ScriptTextEditor::_validate_script() { int warning_nb = warnings.size(); warnings_panel->clear(); + bool has_connections_table = false; // Add missing connections. if (GLOBAL_GET("debug/gdscript/warnings/enable").booleanize()) { Node *base = get_tree()->get_edited_scene_root(); if (base && missing_connections.size() > 0) { + has_connections_table = true; warnings_panel->push_table(1); for (const Connection &connection : missing_connections) { String base_path = base->get_name(); @@ -458,6 +460,10 @@ void ScriptTextEditor::_validate_script() { code_editor->set_error_count(errors.size()); code_editor->set_warning_count(warning_nb); + if (has_connections_table) { + warnings_panel->add_newline(); + } + // Add script warnings. warnings_panel->push_table(3); for (const ScriptLanguage::Warning &w : warnings) { |