* @brief Selects the Frame Parser tree item for the given source, deferred. */
| 1285 | * @brief Selects the Frame Parser tree item for the given source, deferred. |
| 1286 | */ |
| 1287 | void DataModel::ProjectEditor::displayFrameParserView(int sourceId) |
| 1288 | { |
| 1289 | QTimer::singleShot(100, this, [this, sourceId] { |
| 1290 | if (!m_selectionModel) |
| 1291 | return; |
| 1292 | |
| 1293 | for (auto it = m_sourceParserItems.begin(); it != m_sourceParserItems.end(); ++it) { |
| 1294 | if (it.value().sourceId != sourceId) |
| 1295 | continue; |
| 1296 | |
| 1297 | m_selectionModel->setCurrentIndex(it.key()->index(), QItemSelectionModel::ClearAndSelect); |
| 1298 | break; |
| 1299 | } |
| 1300 | }); |
| 1301 | } |
| 1302 | |
| 1303 | //-------------------------------------------------------------------------------------------------- |
| 1304 | // Model builders |
nothing calls this directly
no test coverage detected