summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editor/plugins/script_text_editor.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index d5af7c5b38..ddf3fd32b4 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -238,10 +238,6 @@ void ScriptTextEditor::_show_warnings_panel(bool p_show) {
void ScriptTextEditor::_warning_clicked(Variant p_line) {
if (p_line.get_type() == Variant::INT) {
goto_line_centered(p_line.operator int64_t());
- } else if (p_line.get_type() == Variant::DICTIONARY) {
- Dictionary meta = p_line.operator Dictionary();
- code_editor->get_text_editor()->insert_line_at(meta["line"].operator int64_t() - 1, "# warning-ignore:" + meta["code"].operator String());
- _validate_script();
}
}
@@ -468,20 +464,8 @@ void ScriptTextEditor::_validate_script() {
}
// Add script warnings.
- warnings_panel->push_table(3);
+ warnings_panel->push_table(2);
for (const ScriptLanguage::Warning &w : warnings) {
- Dictionary ignore_meta;
- ignore_meta["line"] = w.start_line;
- ignore_meta["code"] = w.string_code.to_lower();
- warnings_panel->push_cell();
- warnings_panel->push_meta(ignore_meta);
- warnings_panel->push_color(
- warnings_panel->get_theme_color(SNAME("accent_color"), SNAME("Editor")).lerp(warnings_panel->get_theme_color(SNAME("mono_color"), SNAME("Editor")), 0.5));
- warnings_panel->add_text(TTR("[Ignore]"));
- warnings_panel->pop(); // Color.
- warnings_panel->pop(); // Meta ignore.
- warnings_panel->pop(); // Cell.
-
warnings_panel->push_cell();
warnings_panel->push_meta(w.start_line - 1);
warnings_panel->push_color(warnings_panel->get_theme_color(SNAME("warning_color"), SNAME("Editor")));