Script create diag: Show extensions for currently selected language only.
This commit is contained in:
parent
3d4aa94cf1
commit
8e8e4b30e5
1 changed files with 2 additions and 4 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue