Skip to content

Commit

Permalink
Merge pull request #90784 from KoBeWi/progressive_progress
Browse files Browse the repository at this point in the history
Don't show scene group progress for 1 scene
  • Loading branch information
akien-mga committed Apr 17, 2024
2 parents ab24edc + 5883300 commit 5a502a6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions editor/editor_file_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,10 @@ void EditorFileSystem::_queue_update_script_class(const String &p_path) {
}

void EditorFileSystem::_update_scene_groups() {
EditorProgress ep("update_scene_groups", TTR("Update Scene Groups"), update_scene_paths.size());
EditorProgress *ep = nullptr;
if (update_scene_paths.size() > 1) {
ep = memnew(EditorProgress("update_scene_groups", TTR("Update Scene Groups"), update_scene_paths.size()));
}
int step_count = 0;

update_scene_mutex.lock();
Expand All @@ -1684,9 +1687,12 @@ void EditorFileSystem::_update_scene_groups() {
ProjectSettings::get_singleton()->add_scene_groups_cache(path, scene_groups);
}

ep.step(TTR("Updating Scene Groups..."), step_count++);
if (ep) {
ep->step(TTR("Updating Scene Groups..."), step_count++);
}
}

memdelete_notnull(ep);
update_scene_paths.clear();
update_scene_mutex.unlock();

Expand Down

0 comments on commit 5a502a6

Please sign in to comment.