diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/script_create_dialog.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp index 0f3f5500a8..00fdcb676b 100644 --- a/editor/script_create_dialog.cpp +++ b/editor/script_create_dialog.cpp @@ -271,10 +271,8 @@ void ScriptCreateDialog::_browse_path(bool browse_parent) { file_browse->clear_filters(); List<String> extensions; - // get all possible extensions for script - for (int l = 0; l < language_menu->get_item_count(); l++) { - ScriptServer::get_language(l)->get_recognized_extensions(&extensions); - } + int lang = language_menu->get_selected(); + ScriptServer::get_language(lang)->get_recognized_extensions(&extensions); for (List<String>::Element *E = extensions.front(); E; E = E->next()) { file_browse->add_filter("*." + E->get()); |