summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-06-15 10:26:54 +0200
committerGitHub <noreply@github.com>2019-06-15 10:26:54 +0200
commit880ab1b87298f663bda76d618b510ad337496efd (patch)
treebe39ebd55d803dfc4f8b465cf1223228441d9849
parent7e108da078dc69b8321de2435f8c8187fe6c70e8 (diff)
parentbf97247cecb533b1049c6d163b600385261296c4 (diff)
Merge pull request #29788 from Calinou/improve-default-project-naming
Improve the default project naming in the Project Manager
-rw-r--r--editor/project_manager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 3fd497ed7b..9a3991bef1 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -294,13 +294,13 @@ private:
String sp = _test_path();
if (sp != "") {
- // set the project name to the select folder name
- if (project_name->get_text() == "") {
+ // If the project name is empty or default, infer the project name from the selected folder name
+ if (project_name->get_text() == "" || project_name->get_text() == TTR("New Game Project")) {
sp = sp.replace("\\", "/");
int lidx = sp.find_last("/");
if (lidx != -1) {
- sp = sp.substr(lidx + 1, sp.length());
+ sp = sp.substr(lidx + 1, sp.length()).capitalize();
}
if (sp == "" && mode == MODE_IMPORT)
sp = TTR("Imported Project");