summaryrefslogtreecommitdiff
path: root/editor/project_export.cpp
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2018-12-19 16:50:40 -0200
committerGeorge Marques <george@gmarqu.es>2019-05-18 15:33:57 -0300
commitc121d8871d339f740a11943f5c4da9cc9b6936db (patch)
tree5b05b0031c2aac8c1c35e92fbe8cec0d004c6b87 /editor/project_export.cpp
parentac58abfd581dd2a3feb11f313d7c64ce7f0f7124 (diff)
Allow project export to be canceled
Diffstat (limited to 'editor/project_export.cpp')
-rw-r--r--editor/project_export.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index b9cf7ec10a..e1950c666c 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -972,7 +972,7 @@ void ProjectExportDialog::_export_project_to_path(const String &p_path) {
current->set_export_path(p_path);
Error err = platform->export_project(current, export_debug->is_pressed(), p_path, 0);
- if (err != OK) {
+ if (err != OK && err != ERR_SKIP) {
if (err == ERR_FILE_NOT_FOUND) {
error_dialog->set_text(vformat(TTR("Failed to export the project for platform '%s'.\nExport templates seem to be missing or invalid."), platform->get_name()));
} else { // Assume misconfiguration. FIXME: Improve error handling and preset config validation.
@@ -1001,7 +1001,7 @@ void ProjectExportDialog::_export_all_dialog_action(const String &p_str) {
void ProjectExportDialog::_export_all(bool p_debug) {
String mode = p_debug ? TTR("Debug") : TTR("Release");
- EditorProgress ep("exportall", TTR("Exporting All") + " " + mode, EditorExport::get_singleton()->get_export_preset_count());
+ EditorProgress ep("exportall", TTR("Exporting All") + " " + mode, EditorExport::get_singleton()->get_export_preset_count(), true);
for (int i = 0; i < EditorExport::get_singleton()->get_export_preset_count(); i++) {
Ref<EditorExportPreset> preset = EditorExport::get_singleton()->get_export_preset(i);
@@ -1012,7 +1012,7 @@ void ProjectExportDialog::_export_all(bool p_debug) {
ep.step(preset->get_name(), i);
Error err = platform->export_project(preset, p_debug, preset->get_export_path(), 0);
- if (err != OK) {
+ if (err != OK && err != ERR_SKIP) {
if (err == ERR_FILE_BAD_PATH) {
error_dialog->set_text(TTR("The given export path doesn't exist:") + "\n" + preset->get_export_path().get_base_dir());
} else {