summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorleandrogarber@gmail.com <leandrogarber@gmail.com>2014-06-04 18:30:39 -0300
committerleandrogarber@gmail.com <leandrogarber@gmail.com>2014-06-04 18:30:39 -0300
commit729cadad13bdd9e49543cda7331e817c72460155 (patch)
tree7533dad163e8072e204ef12aeace2357fa8104fa /tools
parent0be5ff50aaf3041f05ea230e603742832b891123 (diff)
small feature: set project name automatically when choosing path for new projects (recommit due problem with codeblocks tabs)
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/project_manager.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp
index f6bc2e1b60..cd32a00817 100644
--- a/tools/editor/project_manager.cpp
+++ b/tools/editor/project_manager.cpp
@@ -100,17 +100,18 @@ class NewProjectDialog : public ConfirmationDialog {
if ( _test_path() ) {
- String sp=p_path;
+ String sp=p_path;
- sp=sp.replace("\\","/");
- int lidx=sp.find_last("/");
- if (lidx!=-1) {
- sp=sp.substr(lidx+1,sp.length());
- }
- if (sp=="" && import_mode )
- sp="Imported Project";
+ sp=sp.replace("\\","/");
+ int lidx=sp.find_last("/");
- project_name->set_text(sp);
+ if (lidx!=-1) {
+ sp=sp.substr(lidx+1,sp.length());
+ }
+ if (sp=="" && import_mode )
+ sp="Imported Project";
+
+ project_name->set_text(sp);
}
}