You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 18:41:20 +00:00
Merge pull request #113541 from Rindbee/fix-no-scan-after-dir-creation-and-deletion
Fix the issue of no scan after dir creation and/or deletion
This commit is contained in:
@@ -1064,8 +1064,11 @@ void FileDialog::_file_list_select_first() {
|
||||
}
|
||||
|
||||
void FileDialog::_delete_confirm() {
|
||||
OS::get_singleton()->move_to_trash(_get_item_path(_get_selected_file_idx()));
|
||||
invalidate();
|
||||
Error err = OS::get_singleton()->move_to_trash(_get_item_path(_get_selected_file_idx()));
|
||||
if (err == OK) {
|
||||
invalidate();
|
||||
_dir_contents_changed();
|
||||
}
|
||||
}
|
||||
|
||||
void FileDialog::_filename_filter_selected() {
|
||||
@@ -1537,6 +1540,7 @@ FileDialog::Access FileDialog::get_access() const {
|
||||
void FileDialog::_make_dir_confirm() {
|
||||
Error err = dir_access->make_dir(new_dir_name->get_text().strip_edges());
|
||||
if (err == OK) {
|
||||
_dir_contents_changed();
|
||||
_change_dir(new_dir_name->get_text().strip_edges());
|
||||
update_filters();
|
||||
_push_history();
|
||||
|
||||
@@ -368,6 +368,7 @@ protected:
|
||||
|
||||
bool _can_use_native_popup() const;
|
||||
virtual void _item_menu_id_pressed(int p_option);
|
||||
virtual void _dir_contents_changed() {}
|
||||
|
||||
virtual bool _should_use_native_popup() const;
|
||||
virtual bool _should_hide_file(const String &p_file) const { return false; }
|
||||
|
||||
Reference in New Issue
Block a user