summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorAndreas Haas <liu.gam3@gmail.com>2017-07-01 15:18:55 +0200
committerAndreas Haas <liu.gam3@gmail.com>2017-07-01 15:19:34 +0200
commit8e8e4b30e51cfc063daa57e031b7f427703e0eb8 (patch)
tree83487ce8b8f2a31cf9714b8bc229f1c8e2f8b58d /editor
parent3d4aa94cf102adffdf2f167eb4c41ba48109fb48 (diff)
Script create diag: Show extensions for currently selected language only.
Diffstat (limited to 'editor')
-rw-r--r--editor/script_create_dialog.cpp6
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());