mirror of
https://github.com/godotengine/godot.git
synced 2025-01-11 04:30:50 +00:00
small feature: set project name automatically when choosing path for new projects (recommit due problem with codeblocks tabs)
This commit is contained in:
parent
0be5ff50aa
commit
729cadad13
@ -100,17 +100,18 @@ class NewProjectDialog : public ConfirmationDialog {
|
|||||||
|
|
||||||
if ( _test_path() ) {
|
if ( _test_path() ) {
|
||||||
|
|
||||||
String sp=p_path;
|
String sp=p_path;
|
||||||
|
|
||||||
sp=sp.replace("\\","/");
|
sp=sp.replace("\\","/");
|
||||||
int lidx=sp.find_last("/");
|
int lidx=sp.find_last("/");
|
||||||
if (lidx!=-1) {
|
|
||||||
sp=sp.substr(lidx+1,sp.length());
|
|
||||||
}
|
|
||||||
if (sp=="" && import_mode )
|
|
||||||
sp="Imported Project";
|
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user