* @brief Replaces the group at groupId and emits groupsChanged. */
| 3239 | * @brief Replaces the group at groupId and emits groupsChanged. |
| 3240 | */ |
| 3241 | void DataModel::ProjectModel::updateGroup(const int groupId, |
| 3242 | const DataModel::Group& group, |
| 3243 | const bool rebuildTree) |
| 3244 | { |
| 3245 | if (groupId < 0 || static_cast<size_t>(groupId) >= m_groups.size()) |
| 3246 | return; |
| 3247 | |
| 3248 | m_groups[groupId] = group; |
| 3249 | |
| 3250 | if (rebuildTree) |
| 3251 | Q_EMIT groupsChanged(); |
| 3252 | else |
| 3253 | Q_EMIT groupDataChanged(); |
| 3254 | |
| 3255 | setModified(true); |
| 3256 | } |
| 3257 | |
| 3258 | /** |
| 3259 | * @brief Replaces the dataset at @p groupId/@p datasetId. |
no test coverage detected