MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / applyGroupImgModeEdit

Method applyGroupImgModeEdit

app/src/DataModel/ProjectEditor.cpp:4280–4290  ·  view source on GitHub ↗

* @brief Applies an image-mode edit; returns true when handled (caller skips Q_EMIT). */

Source from the content-addressed store, hash-verified

4278 * @brief Applies an image-mode edit; returns true when handled (caller skips Q_EMIT).
4279 */
4280bool DataModel::ProjectEditor::applyGroupImgModeEdit(int modeIdx, int groupId)
4281{
4282 const QStringList kImgModeValues = {QStringLiteral("autodetect"), QStringLiteral("manual")};
4283 if (modeIdx < 0 || modeIdx >= kImgModeValues.size())
4284 return false;
4285
4286 m_selectedGroup.imgDetectionMode = kImgModeValues.at(modeIdx);
4287 DataModel::ProjectModel::instance().updateGroup(groupId, m_selectedGroup);
4288 buildGroupModel(m_selectedGroup);
4289 return true;
4290}
4291#endif
4292
4293/**

Callers

nothing calls this directly

Calls 2

updateGroupMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected