summaryrefslogtreecommitdiff
path: root/editor/project_export.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/project_export.cpp')
-rw-r--r--editor/project_export.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index b9cf7ec10a..ee78b240a4 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -88,14 +88,7 @@ void ProjectExportDialog::popup_export() {
if (saved_size != Rect2()) {
popup(saved_size);
} else {
-
- Size2 popup_size = Size2(900, 700) * editor_get_scale();
- Size2 window_size = get_viewport_rect().size;
-
- popup_size.x = MIN(window_size.x * 0.8, popup_size.x);
- popup_size.y = MIN(window_size.y * 0.8, popup_size.y);
-
- popup_centered(popup_size);
+ popup_centered_clamped(Size2(900, 700) * EDSCALE, 0.8);
}
}
@@ -571,9 +564,8 @@ void ProjectExportDialog::_duplicate_preset() {
Ref<EditorExportPreset> preset = current->get_platform()->create_preset();
ERR_FAIL_COND(!preset.is_valid());
- String name = current->get_name() + "" + itos(1);
+ String name = current->get_name() + " (copy)";
bool make_runnable = true;
- int attempt = 2;
while (true) {
bool valid = true;
@@ -592,8 +584,7 @@ void ProjectExportDialog::_duplicate_preset() {
if (valid)
break;
- attempt++;
- name = current->get_name() + " " + itos(attempt);
+ name += " (copy)";
}
preset->set_name(name);
@@ -972,7 +963,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 +992,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 +1003,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 {