* @brief Builds the runtime group list from the project, dropping disabled groups and the * disabled datasets of the survivors so frame building never sees them. The editor keeps * the full set; surviving datasets retain their explicit frame index, so no sibling shifts. */
| 83 | * the full set; surviving datasets retain their explicit frame index, so no sibling shifts. |
| 84 | */ |
| 85 | [[nodiscard]] std::vector<DataModel::Group> buildEnabledGroups( |
| 86 | const std::vector<DataModel::Group>& projectGroups) |
| 87 | { |
| 88 | std::vector<DataModel::Group> groups; |
| 89 | groups.reserve(projectGroups.size()); |
| 90 | |
| 91 | for (const auto& group : projectGroups) { |
| 92 | if (!group.enabled) |
| 93 | continue; |
| 94 | |
| 95 | DataModel::Group runtimeGroup = group; |
| 96 | std::vector<DataModel::Dataset> datasets; |
| 97 | datasets.reserve(runtimeGroup.datasets.size()); |
| 98 | for (auto& dataset : runtimeGroup.datasets) |
| 99 | if (dataset.enabled) |
| 100 | datasets.push_back(std::move(dataset)); |
| 101 | |
| 102 | runtimeGroup.datasets = std::move(datasets); |
| 103 | groups.push_back(std::move(runtimeGroup)); |
| 104 | } |
| 105 | |
| 106 | return groups; |
| 107 | } |
| 108 | |
| 109 | //-------------------------------------------------------------------------------------------------- |
| 110 | // Constructor & singleton access |
no test coverage detected