Fix invaild path error text in project manager when no path is entered
This commit is contained in:
parent
6b106b319b
commit
d8c14af546
@ -65,7 +65,7 @@ class NewProjectDialog : public ConfirmationDialog {
|
|||||||
error->set_text("");
|
error->set_text("");
|
||||||
get_ok()->set_disabled(true);
|
get_ok()->set_disabled(true);
|
||||||
DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
||||||
if (d->change_dir(project_path->get_text())!=OK) {
|
if (project_path->get_text() != "" && d->change_dir(project_path->get_text())!=OK) {
|
||||||
error->set_text("Invalid Path for Project, Path Must Exist!");
|
error->set_text("Invalid Path for Project, Path Must Exist!");
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
return false;
|
return false;
|
||||||
@ -82,7 +82,7 @@ class NewProjectDialog : public ConfirmationDialog {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if (!d->file_exists("engine.cfg")) {
|
if (project_path->get_text() != "" && !d->file_exists("engine.cfg")) {
|
||||||
|
|
||||||
error->set_text("Invalid Project Path (engine.cfg must exist).");
|
error->set_text("Invalid Project Path (engine.cfg must exist).");
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
|
Loading…
Reference in New Issue
Block a user