Merge pull request #76700 from dsnopek/dedicated-server-mark-inherited

Explicitly mark inherited export mode when making a dedicated server export
This commit is contained in:
Clay John 2023-05-05 09:23:32 -07:00 committed by GitHub
commit 214a848e0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -833,14 +833,20 @@ bool ProjectExportDialog::_fill_tree(EditorFileSystemDirectory *p_dir, TreeItem
void ProjectExportDialog::_propagate_file_export_mode(TreeItem *p_item, EditorExportPreset::FileExportMode p_inherited_export_mode) { void ProjectExportDialog::_propagate_file_export_mode(TreeItem *p_item, EditorExportPreset::FileExportMode p_inherited_export_mode) {
EditorExportPreset::FileExportMode file_export_mode = (EditorExportPreset::FileExportMode)(int)p_item->get_metadata(1); EditorExportPreset::FileExportMode file_export_mode = (EditorExportPreset::FileExportMode)(int)p_item->get_metadata(1);
bool is_inherited = false;
if (file_export_mode == EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED) { if (file_export_mode == EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED) {
file_export_mode = p_inherited_export_mode; file_export_mode = p_inherited_export_mode;
is_inherited = true;
} }
if (file_export_mode == EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED) { if (file_export_mode == EditorExportPreset::MODE_FILE_NOT_CUSTOMIZED) {
p_item->set_text(1, ""); p_item->set_text(1, "");
} else { } else {
p_item->set_text(1, file_mode_popup->get_item_text(file_mode_popup->get_item_index(file_export_mode))); String text = file_mode_popup->get_item_text(file_mode_popup->get_item_index(file_export_mode));
if (is_inherited) {
text += " " + TTR("(Inherited)");
}
p_item->set_text(1, text);
} }
for (int i = 0; i < p_item->get_child_count(); i++) { for (int i = 0; i < p_item->get_child_count(); i++) {