You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
Select newly created folder on Directory dialog
(cherry picked from commit 28a0ed75ba)
This commit is contained in:
@@ -143,7 +143,7 @@ void EditorDirDialog::set_current_path(const String& p_path) {
|
|||||||
reload();
|
reload();
|
||||||
String p = p_path;
|
String p = p_path;
|
||||||
if (p.begins_with("res://"))
|
if (p.begins_with("res://"))
|
||||||
p.replace_first("res://","");
|
p = p.replace_first("res://","");
|
||||||
|
|
||||||
Vector<String> dirs = p.split("/");
|
Vector<String> dirs = p.split("/");
|
||||||
|
|
||||||
@@ -162,13 +162,13 @@ void EditorDirDialog::set_current_path(const String& p_path) {
|
|||||||
ERR_FAIL_COND(!p);
|
ERR_FAIL_COND(!p);
|
||||||
String pp = p->get_metadata(0);
|
String pp = p->get_metadata(0);
|
||||||
if (pp=="") {
|
if (pp=="") {
|
||||||
|
p->set_metadata(0,String(r->get_metadata(0)).plus_file(d));
|
||||||
_update_dir(p);
|
_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;
|
r=p;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ void EditorDirDialog::_make_dir_confirm() {
|
|||||||
if (err!=OK) {
|
if (err!=OK) {
|
||||||
mkdirerr->popup_centered_minsize(Size2(250,80));
|
mkdirerr->popup_centered_minsize(Size2(250,80));
|
||||||
} else {
|
} else {
|
||||||
reload();
|
set_current_path(dir.plus_file(makedirname->get_text()));
|
||||||
}
|
}
|
||||||
makedirname->set_text(""); // reset label
|
makedirname->set_text(""); // reset label
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user