summaryrefslogtreecommitdiff
path: root/editor/script_create_dialog.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-02-15 12:10:23 +0100
committerGitHub <noreply@github.com>2020-02-15 12:10:23 +0100
commit53cf289f309ef44821e5bb1fe0c81de29a82d9d3 (patch)
tree1bb1c32f3529ef66d3c797c9049d9677496354c6 /editor/script_create_dialog.cpp
parent8aad43e0c12c4e85afa00fb7d8c59891190031ce (diff)
parent032b0e5899e8e680f8f75d79adacc077d9b914a5 (diff)
Merge pull request #36230 from SkyLucilfer/iconBug
Fix script creation icon not showing at startup bug
Diffstat (limited to 'editor/script_create_dialog.cpp')
-rw-r--r--editor/script_create_dialog.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index a3764b4085..6327f30eb4 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -52,10 +52,9 @@ void ScriptCreateDialog::_notification(int p_what) {
language_menu->set_item_icon(i, lang_icon);
}
}
+
String last_lang = EditorSettings::get_singleton()->get_project_metadata("script_setup", "last_selected_language", "");
- Ref<Texture2D> last_lang_icon;
if (!last_lang.empty()) {
-
for (int i = 0; i < language_menu->get_item_count(); i++) {
if (language_menu->get_item_text(i) == last_lang) {
language_menu->select(i);
@@ -63,14 +62,10 @@ void ScriptCreateDialog::_notification(int p_what) {
break;
}
}
-
- last_lang_icon = get_icon(last_lang, "EditorIcons");
} else {
- last_lang_icon = language_menu->get_item_icon(default_language);
- }
- if (last_lang_icon.is_valid()) {
- language_menu->set_icon(last_lang_icon);
+ language_menu->select(default_language);
}
+
path_button->set_icon(get_icon("Folder", "EditorIcons"));
parent_browse_button->set_icon(get_icon("Folder", "EditorIcons"));
parent_search_button->set_icon(get_icon("ClassList", "EditorIcons"));