summaryrefslogtreecommitdiff
path: root/editor/project_export.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-05-23 17:01:22 +0200
committerGitHub <noreply@github.com>2019-05-23 17:01:22 +0200
commit2be57e47b3e5e3171d0ecbc20717fb03c22cbf33 (patch)
tree654e4ae11ee497c3b76ed2fbc7d7db30c21f6832 /editor/project_export.cpp
parentc20388f2e18d7a96907bc9abaa50604448d6d63b (diff)
parentfe62b6941976d543505976c93f5d9758d4f58a0f (diff)
Merge pull request #29124 from AMS21/fix-28091
Fixed naming issue when duplicating an export
Diffstat (limited to 'editor/project_export.cpp')
-rw-r--r--editor/project_export.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index e1950c666c..cc110f309c 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -571,9 +571,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 +591,7 @@ void ProjectExportDialog::_duplicate_preset() {
if (valid)
break;
- attempt++;
- name = current->get_name() + " " + itos(attempt);
+ name += " (copy)";
}
preset->set_name(name);