1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Use Hashset for dependency list when moving

This commit is contained in:
Jordyfel
2023-10-25 16:16:38 +03:00
parent 06d5189167
commit 50b7387a3f
5 changed files with 31 additions and 24 deletions

View File

@@ -1811,11 +1811,18 @@ void EditorNode::save_all_scenes() {
_save_all_scenes();
}
void EditorNode::save_scene_list(Vector<String> p_scene_filenames) {
void EditorNode::save_scene_if_open(const String &p_scene_path) {
int idx = editor_data.get_edited_scene_from_path(p_scene_path);
if (idx >= 0) {
_save_scene(p_scene_path, idx);
}
}
void EditorNode::save_scene_list(const HashSet<String> &p_scene_paths) {
for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {
Node *scene = editor_data.get_edited_scene_root(i);
if (scene && (p_scene_filenames.find(scene->get_scene_file_path()) >= 0)) {
if (scene && p_scene_paths.has(scene->get_scene_file_path())) {
_save_scene(scene->get_scene_file_path(), i);
}
}