diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-09-06 07:51:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-06 07:51:05 +0200 |
commit | d7cf27b507165d4f81d71af61812e7a7fcffd78c (patch) | |
tree | c6828c5ac24174f378bfd580b739be564923d2c6 /tools/editor | |
parent | 4b9dac87f541e4b90b78856cc9b8c8cc0609e51a (diff) | |
parent | 28a0ed75ba1d40874d19704342ed7959fff65c00 (diff) |
Merge pull request #6406 from volzhs/create-folder
Select newly created folder on Directory dialog
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/editor_dir_dialog.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/editor/editor_dir_dialog.cpp b/tools/editor/editor_dir_dialog.cpp index f6ce7bf3f8..cf0732501e 100644 --- a/tools/editor/editor_dir_dialog.cpp +++ b/tools/editor/editor_dir_dialog.cpp @@ -143,7 +143,7 @@ void EditorDirDialog::set_current_path(const String& p_path) { reload(); String p = p_path; if (p.begins_with("res://")) - p.replace_first("res://",""); + p = p.replace_first("res://",""); Vector<String> dirs = p.split("/"); @@ -162,13 +162,13 @@ void EditorDirDialog::set_current_path(const String& p_path) { ERR_FAIL_COND(!p); String pp = p->get_metadata(0); if (pp=="") { + p->set_metadata(0,String(r->get_metadata(0)).plus_file(d)); _update_dir(p); - updating=true; - p->set_collapsed(false); - updating=false; - _item_collapsed(p); - } + updating=true; + p->set_collapsed(false); + updating=false; + _item_collapsed(p); r=p; } @@ -216,7 +216,7 @@ void EditorDirDialog::_make_dir_confirm() { if (err!=OK) { mkdirerr->popup_centered_minsize(Size2(250,80)); } else { - reload(); + set_current_path(dir.plus_file(makedirname->get_text())); } makedirname->set_text(""); // reset label } |