* @brief Re-routes the group (and its datasets) to the source at the given combobox index. */
| 4215 | * @brief Re-routes the group (and its datasets) to the source at the given combobox index. |
| 4216 | */ |
| 4217 | void DataModel::ProjectEditor::applyGroupSourceEdit(int srcIdx, int groupId) |
| 4218 | { |
| 4219 | const auto& sources = DataModel::ProjectModel::instance().sources(); |
| 4220 | if (srcIdx < 0 || srcIdx >= static_cast<int>(sources.size())) |
| 4221 | return; |
| 4222 | |
| 4223 | m_selectedGroup.sourceId = sources[srcIdx].sourceId; |
| 4224 | for (auto& ds : m_selectedGroup.datasets) |
| 4225 | ds.sourceId = m_selectedGroup.sourceId; |
| 4226 | |
| 4227 | DataModel::ProjectModel::instance().updateGroup(groupId, m_selectedGroup, true); |
| 4228 | } |
| 4229 | |
| 4230 | /** |
| 4231 | * @brief Applies a group-widget change; returns false when the change is rejected. |
nothing calls this directly
no test coverage detected