diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_file_dialog.cpp | 7 | ||||
-rw-r--r-- | editor/plugins/particles_2d_editor_plugin.cpp | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 724b821267..3d198dec67 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -710,7 +710,6 @@ void EditorFileDialog::update_file_list() { } String cdir = dir_access->get_current_dir(); - bool skip_pp = access == ACCESS_RESOURCES && cdir == "res://"; dir_access->list_dir_begin(); @@ -733,7 +732,7 @@ void EditorFileDialog::update_file_list() { if (show_hidden || !ishidden) { if (!isdir) files.push_back(item); - else if (item != ".." || !skip_pp) + else dirs.push_back(item); } } @@ -764,8 +763,6 @@ void EditorFileDialog::update_file_list() { dirs.pop_front(); } - dirs.clear(); - List<String> patterns; // build filter if (filter->get_selected() == filter->get_item_count() - 1) { @@ -864,8 +861,6 @@ void EditorFileDialog::update_file_list() { break; } } - - files.clear(); } void EditorFileDialog::_filter_selected(int) { diff --git a/editor/plugins/particles_2d_editor_plugin.cpp b/editor/plugins/particles_2d_editor_plugin.cpp index 50bdf4512b..4c354b8002 100644 --- a/editor/plugins/particles_2d_editor_plugin.cpp +++ b/editor/plugins/particles_2d_editor_plugin.cpp @@ -93,7 +93,13 @@ void Particles2DEditorPlugin::_menu_callback(int p_idx) { cpu_particles->set_pause_mode(particles->get_pause_mode()); cpu_particles->set_z_index(particles->get_z_index()); - EditorNode::get_singleton()->get_scene_tree_dock()->replace_node(particles, cpu_particles, false); + UndoRedo *ur = EditorNode::get_singleton()->get_undo_redo(); + ur->create_action(TTR("Convert from Particles2D")); + ur->add_do_method(EditorNode::get_singleton()->get_scene_tree_dock(), "replace_node", particles, cpu_particles, true, false); + ur->add_do_reference(particles); + ur->add_undo_method(EditorNode::get_singleton()->get_scene_tree_dock(), "replace_node", cpu_particles, particles, false, false); + ur->add_undo_reference(this); + ur->commit_action(); } break; } |