Skip to content

Commit

Permalink
Merge pull request #89739 from jsjtxietian/group-step
Browse files Browse the repository at this point in the history
Add progress bar when updating scene groups
  • Loading branch information
akien-mga committed Apr 15, 2024
2 parents 684e7aa + cbb67d1 commit ce2a09f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion editor/editor_file_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1664,8 +1664,10 @@ void EditorFileSystem::_queue_update_script_class(const String &p_path) {
}

void EditorFileSystem::_update_scene_groups() {
update_scene_mutex.lock();
EditorProgress ep("update_scene_groups", TTR("Update Scene Groups"), update_scene_paths.size());
int step_count = 0;

update_scene_mutex.lock();
for (const String &path : update_scene_paths) {
ProjectSettings::get_singleton()->remove_scene_groups_cache(path);

Expand All @@ -1681,6 +1683,8 @@ void EditorFileSystem::_update_scene_groups() {
if (!scene_groups.is_empty()) {
ProjectSettings::get_singleton()->add_scene_groups_cache(path, scene_groups);
}

ep.step(TTR("Updating Scene Groups..."), step_count++);
}

update_scene_paths.clear();
Expand Down

0 comments on commit ce2a09f

Please sign in to comment.