summaryrefslogtreecommitdiffstats
path: root/editor/editor_file_system.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2024-04-17 10:59:53 +0200
committerkobewi <kobewi4e@gmail.com>2024-04-17 11:23:54 +0200
commit5883300b921b05b6e465a2df5c1393d42eb5ead3 (patch)
tree3bdf199898f78d220ce5fea286c6292ef9c9b68d /editor/editor_file_system.cpp
parent658e97c93aa2533cb7b12f05e62dcf6864e7acbe (diff)
downloadredot-engine-5883300b921b05b6e465a2df5c1393d42eb5ead3.tar.gz
Don't show scene group progress for 1 scene
Diffstat (limited to 'editor/editor_file_system.cpp')
-rw-r--r--editor/editor_file_system.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 8ae1752ca7..14190a43a5 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -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();
@@ -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();