diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2018-07-18 16:20:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-18 16:20:57 +0200 |
commit | ce53876a444974d091da8a3ba77e16101ed2ff67 (patch) | |
tree | 77f13ec20e33a006e1cf31864020bb04fad0d7ee | |
parent | e064eea940ff1da774f81afed21bfcdd499749f4 (diff) | |
parent | 13239cd4cc271ba4ccac59a060012129829dfc5f (diff) |
Merge pull request #20242 from akien-mga/export-preset-reload
Export: Properly reload preset when opening dialog
-rw-r--r-- | editor/editor_node.cpp | 4 | ||||
-rw-r--r-- | editor/editor_node.h | 1 | ||||
-rw-r--r-- | editor/export_template_manager.cpp | 3 | ||||
-rw-r--r-- | editor/project_export.cpp | 7 | ||||
-rw-r--r-- | scene/gui/item_list.cpp | 2 |
5 files changed, 5 insertions, 12 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 37f1626704..4696bdd5a9 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1856,10 +1856,6 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) { } break; - case SETTINGS_EXPORT_PREFERENCES: { - - //project_export_settings->popup_centered_ratio(); - } break; case FILE_IMPORT_SUBSCENE: { if (!editor_data.get_edited_scene_root()) { diff --git a/editor/editor_node.h b/editor/editor_node.h index 7aa060fe14..88fe008b34 100644 --- a/editor/editor_node.h +++ b/editor/editor_node.h @@ -164,7 +164,6 @@ private: SETTINGS_UPDATE_ALWAYS, SETTINGS_UPDATE_CHANGES, SETTINGS_UPDATE_SPINNER_HIDE, - SETTINGS_EXPORT_PREFERENCES, SETTINGS_PREFERENCES, SETTINGS_LAYOUT_SAVE, SETTINGS_LAYOUT_DELETE, diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp index 823e2f4617..931785333f 100644 --- a/editor/export_template_manager.cpp +++ b/editor/export_template_manager.cpp @@ -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); } } diff --git a/editor/project_export.cpp b/editor/project_export.cpp index 9f87fc82b5..170546f14c 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -76,6 +76,9 @@ void ProjectExportDialog::popup_export() { } _update_presets(); + if (presets->get_current() >= 0) { + _edit_preset(presets->get_current()); // triggers rescan for templates if newly installed + } // Restore valid window bounds or pop up at default size. if (EditorSettings::get_singleton()->has_setting("interface/dialogs/export_bounds")) { @@ -154,7 +157,6 @@ void ProjectExportDialog::_update_presets() { if (current_idx != -1) { presets->select(current_idx); - //_edit_preset(current_idx); } updating = false; @@ -167,6 +169,7 @@ void ProjectExportDialog::_edit_preset(int p_index) { name->set_editable(false); runnable->set_disabled(true); parameters->edit(NULL); + presets->unselect_all(); delete_preset->set_disabled(true); sections->hide(); patches->clear(); @@ -438,11 +441,9 @@ void ProjectExportDialog::_delete_preset() { void ProjectExportDialog::_delete_preset_confirm() { int idx = presets->get_current(); - parameters->edit(NULL); //to avoid crash _edit_preset(-1); EditorExport::get_singleton()->remove_export_preset(idx); _update_presets(); - _edit_preset(presets->get_current()); } Variant ProjectExportDialog::get_drag_data_fw(const Point2 &p_point, Control *p_from) { diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp index 72ed0e9b81..aa52739b0a 100644 --- a/scene/gui/item_list.cpp +++ b/scene/gui/item_list.cpp @@ -285,7 +285,7 @@ void ItemList::unselect_all() { items[i].selected = false; } - + current = -1; update(); } |