summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsjtxietian <jsjtxietian@outlook.com>2024-03-21 19:20:12 +0800
committerjsjtxietian <jsjtxietian@outlook.com>2024-03-21 19:20:12 +0800
commitcbb67d114e38764dce501136775d6a5ddc4cac7c (patch)
treec4da0a35a7f1bc028eac3c763108816f6ee7f7f6
parentfe01776f05b1787b28b4a270d53037a3c25f4ca2 (diff)
downloadredot-engine-cbb67d114e38764dce501136775d6a5ddc4cac7c.tar.gz
Add progress bar when update scene groups
-rw-r--r--editor/editor_file_system.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index ff42b82435..cac56c61f0 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -1657,8 +1657,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);
@@ -1674,6 +1676,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();