summaryrefslogtreecommitdiffstats
path: root/editor/project_manager.cpp
diff options
context:
space:
mode:
authorjsjtxietian <jsjtxietian@outlook.com>2023-11-21 19:50:01 +0800
committerjsjtxietian <jsjtxietian@outlook.com>2023-11-21 19:50:01 +0800
commitb8d7a43f7385823d919bbe1fc4236b8b081d37c6 (patch)
tree8818c38aaaeb7892830ceafb00c060b963635041 /editor/project_manager.cpp
parent80de898d721f952dac0b102d48bb73d6b02ee1e8 (diff)
downloadredot-engine-b8d7a43f7385823d919bbe1fc4236b8b081d37c6.tar.gz
Fix project name being overwrite everytime `show_dialog` is called
Diffstat (limited to 'editor/project_manager.cpp')
-rw-r--r--editor/project_manager.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 40c482eb90..ed01187947 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -727,9 +727,12 @@ void ProjectDialog::show_dialog() {
project_path->set_text(d->get_current_dir());
fdialog->set_current_dir(d->get_current_dir());
}
- String proj = TTR("New Game Project");
- project_name->set_text(proj);
- _text_changed(proj);
+
+ if (project_name->get_text().is_empty()) {
+ String proj = TTR("New Game Project");
+ project_name->set_text(proj);
+ _text_changed(proj);
+ }
project_path->set_editable(true);
browse->set_disabled(false);