Fixed ScriptTextEditor errors/warnings panel formatting.
This commit is contained in:
@ -433,10 +433,12 @@ void ScriptTextEditor::_validate_script() {
|
|||||||
int warning_nb = warnings.size();
|
int warning_nb = warnings.size();
|
||||||
warnings_panel->clear();
|
warnings_panel->clear();
|
||||||
|
|
||||||
|
bool has_connections_table = false;
|
||||||
// Add missing connections.
|
// Add missing connections.
|
||||||
if (GLOBAL_GET("debug/gdscript/warnings/enable").booleanize()) {
|
if (GLOBAL_GET("debug/gdscript/warnings/enable").booleanize()) {
|
||||||
Node *base = get_tree()->get_edited_scene_root();
|
Node *base = get_tree()->get_edited_scene_root();
|
||||||
if (base && missing_connections.size() > 0) {
|
if (base && missing_connections.size() > 0) {
|
||||||
|
has_connections_table = true;
|
||||||
warnings_panel->push_table(1);
|
warnings_panel->push_table(1);
|
||||||
for (const Connection &connection : missing_connections) {
|
for (const Connection &connection : missing_connections) {
|
||||||
String base_path = base->get_name();
|
String base_path = base->get_name();
|
||||||
@ -458,6 +460,10 @@ void ScriptTextEditor::_validate_script() {
|
|||||||
code_editor->set_error_count(errors.size());
|
code_editor->set_error_count(errors.size());
|
||||||
code_editor->set_warning_count(warning_nb);
|
code_editor->set_warning_count(warning_nb);
|
||||||
|
|
||||||
|
if (has_connections_table) {
|
||||||
|
warnings_panel->add_newline();
|
||||||
|
}
|
||||||
|
|
||||||
// Add script warnings.
|
// Add script warnings.
|
||||||
warnings_panel->push_table(3);
|
warnings_panel->push_table(3);
|
||||||
for (const ScriptLanguage::Warning &w : warnings) {
|
for (const ScriptLanguage::Warning &w : warnings) {
|
||||||
|
|||||||
Reference in New Issue
Block a user