diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-12-11 14:06:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-11 14:06:08 +0100 |
commit | 1a82877accdff4c452ee7cd796b54348eba38ad7 (patch) | |
tree | 840b889548bdfc57bfdc7fb43ddba10d2a583426 /editor | |
parent | 21593ff5bb7467cf1fd7d6e63f760d51d258f707 (diff) | |
parent | 1884952ae3c513d091409751347dc2b2b628d349 (diff) |
Merge pull request #24278 from MarianoGnu/script_editor
Fix "index -1 out of range" error spam. Fixes #24277
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index b6dbc6fcf7..6d4b1d1b9c 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -1078,7 +1078,7 @@ void ScriptTextEditor::set_syntax_highlighter(SyntaxHighlighter *p_highlighter) if (p_highlighter != NULL) highlighter_menu->set_item_checked(highlighter_menu->get_item_idx_from_text(p_highlighter->get_name()), true); else - highlighter_menu->set_item_checked(highlighter_menu->get_item_idx_from_text("Standard"), true); + highlighter_menu->set_item_checked(highlighter_menu->get_item_idx_from_text(TTR("Standard")), true); } void ScriptTextEditor::_change_syntax_highlighter(int p_idx) { @@ -1512,7 +1512,7 @@ ScriptTextEditor::ScriptTextEditor() { convert_case->add_shortcut(ED_SHORTCUT("script_text_editor/capitalize", TTR("Capitalize"), KEY_MASK_SHIFT | KEY_F6), EDIT_CAPITALIZE); convert_case->connect("id_pressed", this, "_edit_option"); - highlighters["Standard"] = NULL; + highlighters[TTR("Standard")] = NULL; highlighter_menu = memnew(PopupMenu); highlighter_menu->set_name("highlighter_menu"); edit_menu->get_popup()->add_child(highlighter_menu); |