Script create diag: Show extensions for currently selected language only.

This commit is contained in:
Andreas Haas 2017-07-01 15:18:55 +02:00
parent 3d4aa94cf1
commit 8e8e4b30e5
No known key found for this signature in database
GPG key ID: B5FFAE1B65FBD2E1

View file

@ -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());