You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
-Do not ask about overwriting when opening a script in the wizard, but still show complaint about existing. Closes #4545
-Fixed a crash in EditorDirDialog
This commit is contained in:
@@ -78,6 +78,11 @@ void EditorDirDialog::_update_dir(TreeItem* p_item) {
|
||||
|
||||
void EditorDirDialog::reload() {
|
||||
|
||||
if (!is_visible()) {
|
||||
must_reload=true;
|
||||
return;
|
||||
}
|
||||
|
||||
tree->clear();
|
||||
TreeItem *root = tree->create_item();
|
||||
root->set_metadata(0,"res://");
|
||||
@@ -85,6 +90,8 @@ void EditorDirDialog::reload() {
|
||||
root->set_text(0,"/");
|
||||
_update_dir(root);
|
||||
_item_collapsed(root);
|
||||
must_reload=false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +103,12 @@ void EditorDirDialog::_notification(int p_what) {
|
||||
EditorFileSystem::get_singleton()->connect("filesystem_changed",this,"reload");
|
||||
|
||||
}
|
||||
|
||||
if (p_what==NOTIFICATION_VISIBILITY_CHANGED) {
|
||||
if (must_reload && is_visible()) {
|
||||
reload();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EditorDirDialog::_item_collapsed(Object* _p_item){
|
||||
@@ -243,6 +256,8 @@ EditorDirDialog::EditorDirDialog() {
|
||||
|
||||
get_ok()->set_text(TTR("Choose"));
|
||||
|
||||
must_reload=false;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user