Export: Properly reload preset when opening dialog
Fixes #20119 where newly installed templates were not detected. Also fix a bug with preset deletion where it would attempt to edit an already removed preset. For this I made it so that ItemList::deselect_all() also resets `current` to -1, as a manual ItemList::deselect(idx) already does.
This commit is contained in:
@ -123,7 +123,6 @@ void ExportTemplateManager::_update_template_list() {
|
||||
|
||||
void ExportTemplateManager::_download_template(const String &p_version) {
|
||||
|
||||
print_line("download " + p_version);
|
||||
while (template_list->get_child_count()) {
|
||||
memdelete(template_list->get_child(0));
|
||||
}
|
||||
@ -352,7 +351,6 @@ void ExportTemplateManager::_http_download_mirror_completed(int p_status, int p_
|
||||
bool mirrors_found = false;
|
||||
|
||||
Dictionary d = r;
|
||||
print_line(r);
|
||||
if (d.has("mirrors")) {
|
||||
Array mirrors = d["mirrors"];
|
||||
for (int i = 0; i < mirrors.size(); i++) {
|
||||
@ -507,7 +505,6 @@ void ExportTemplateManager::_notification(int p_what) {
|
||||
|
||||
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
|
||||
if (!is_visible_in_tree()) {
|
||||
print_line("closed");
|
||||
set_process(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user