From fe62b6941976d543505976c93f5d9758d4f58a0f Mon Sep 17 00:00:00 2001 From: AMS21 Date: Thu, 23 May 2019 14:45:17 +0200 Subject: [PATCH] Fixed naming issue when duplicating an export --- editor/project_export.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/editor/project_export.cpp b/editor/project_export.cpp index e1950c666c2..cc110f309cb 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -571,9 +571,8 @@ void ProjectExportDialog::_duplicate_preset() { Ref 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);