Skip to content

Commit a0cd8f1

Browse files
committed
Merge pull request #99391 from Giganzo/export-debug
Add persistent states for export with debug, as patch on editor restarts
2 parents 650e96b + 8a8fd29 commit a0cd8f1

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

editor/export/project_export.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,6 +1206,9 @@ void ProjectExportDialog::_export_pck_zip_selected(const String &p_path) {
12061206
bool export_debug = fd_option.get(TTR("Export With Debug"), true);
12071207
bool export_as_patch = fd_option.get(TTR("Export As Patch"), true);
12081208

1209+
EditorSettings::get_singleton()->set_project_metadata("export_options", "export_debug", export_debug);
1210+
EditorSettings::get_singleton()->set_project_metadata("export_options", "export_as_patch", export_as_patch);
1211+
12091212
if (p_path.ends_with(".zip")) {
12101213
if (export_as_patch) {
12111214
platform->export_zip_patch(current, export_debug, p_path);
@@ -1305,6 +1308,8 @@ void ProjectExportDialog::_export_project_to_path(const String &p_path) {
13051308
Dictionary fd_option = export_project->get_selected_options();
13061309
bool export_debug = fd_option.get(TTR("Export With Debug"), true);
13071310

1311+
EditorSettings::get_singleton()->set_project_metadata("export_options", "export_debug", export_debug);
1312+
13081313
Error err = platform->export_project(current, export_debug, current->get_export_path(), 0);
13091314
result_dialog_log->clear();
13101315
if (err != ERR_SKIP) {
@@ -1774,9 +1779,9 @@ ProjectExportDialog::ProjectExportDialog() {
17741779
export_project->connect("file_selected", callable_mp(this, &ProjectExportDialog::_export_project_to_path));
17751780
export_project->get_line_edit()->connect(SceneStringName(text_changed), callable_mp(this, &ProjectExportDialog::_validate_export_path));
17761781

1777-
export_project->add_option(TTR("Export With Debug"), Vector<String>(), true);
1778-
export_pck_zip->add_option(TTR("Export With Debug"), Vector<String>(), true);
1779-
export_pck_zip->add_option(TTR("Export As Patch"), Vector<String>(), true);
1782+
export_project->add_option(TTR("Export With Debug"), Vector<String>(), EditorSettings::get_singleton()->get_project_metadata("export_options", "export_debug", true));
1783+
export_pck_zip->add_option(TTR("Export With Debug"), Vector<String>(), EditorSettings::get_singleton()->get_project_metadata("export_options", "export_debug", true));
1784+
export_pck_zip->add_option(TTR("Export As Patch"), Vector<String>(), EditorSettings::get_singleton()->get_project_metadata("export_options", "export_as_patch", true));
17801785

17811786
set_hide_on_ok(false);
17821787

0 commit comments

Comments
 (0)