Remove current export template version from "Installed Versions"

**Not tested** (I don't have an easy way to test currently). Resolves https://github.com/godotengine/godot-proposals/issues/2394 .

(cherry picked from commit c562c6943f)
This commit is contained in:
Lightning_A 2021-03-12 16:32:53 -07:00 committed by Rémi Verschelde
parent 7cb77a859a
commit a853cf25f6
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -118,14 +118,14 @@ void ExportTemplateManager::_update_template_list() {
} }
for (Set<String>::Element *E = templates.back(); E; E = E->prev()) { for (Set<String>::Element *E = templates.back(); E; E = E->prev()) {
String text = E->get();
if (text == current_version) {
continue;
}
HBoxContainer *hbc = memnew(HBoxContainer); HBoxContainer *hbc = memnew(HBoxContainer);
Label *version = memnew(Label); Label *version = memnew(Label);
version->set_modulate(get_color("disabled_font_color", "Editor")); version->set_modulate(current->get_color("disabled_font_color", "Editor"));
String text = E->get();
if (text == current_version) {
text += " " + TTR("(Current)");
}
version->set_text(text); version->set_text(text);
version->set_h_size_flags(SIZE_EXPAND_FILL); version->set_h_size_flags(SIZE_EXPAND_FILL);
hbc->add_child(version); hbc->add_child(version);
@ -677,7 +677,7 @@ ExportTemplateManager::ExportTemplateManager() {
main_vb->add_margin_child(TTR("Current Version:"), current_hb, false); main_vb->add_margin_child(TTR("Current Version:"), current_hb, false);
installed_scroll = memnew(ScrollContainer); installed_scroll = memnew(ScrollContainer);
main_vb->add_margin_child(TTR("Installed Versions:"), installed_scroll, true); main_vb->add_margin_child(TTR("Other Installed Versions:"), installed_scroll, true);
installed_vb = memnew(VBoxContainer); installed_vb = memnew(VBoxContainer);
installed_scroll->add_child(installed_vb); installed_scroll->add_child(installed_vb);