schedule_v3: fix default set for systems not being applied (#7350)

# Objective

`add_system(system)` without any `.in_set` configuration should land in `CoreSet::Update`.
We check that the sets are empty, but for systems there is always the `SystemTypeset`.

## Solution

- instead of `is_empty()`, check that the only set it the `SystemTypeSet`
This commit is contained in:
Jakob Hellermann 2023-01-24 14:44:46 +00:00
parent 6e44d8a251
commit 671e7a0de8

View File

@ -341,9 +341,11 @@ impl ScheduleGraph {
let id = NodeId::System(self.systems.len());
if graph_info.sets.is_empty() {
if let Some(default) = self.default_set.as_ref() {
graph_info.sets.push(default.dyn_clone());
if let [single_set] = graph_info.sets.as_slice() {
if single_set.is_system_type() {
if let Some(default) = self.default_set.as_ref() {
graph_info.sets.push(default.dyn_clone());
}
}
}