* @brief Mirrors all properties from the active UI-config driver to the live DeviceManager driver; * the live driver is signal-blocked to suppress its fan-out (the UI driver's configurationChanged * still notifies downstream, so nothing is lost). */
| 1096 | * still notifies downstream, so nothing is lost). |
| 1097 | */ |
| 1098 | void IO::ConnectionManager::syncUiDriverToLive() |
| 1099 | { |
| 1100 | if (m_syncingFromProject) |
| 1101 | return; |
| 1102 | |
| 1103 | const auto& srcs = DataModel::ProjectModel::instance().sources(); |
| 1104 | if (AppState::instance().operationMode() == SerialStudio::ProjectFile && srcs.size() > 1) |
| 1105 | return; |
| 1106 | |
| 1107 | HAL_Driver* uiDriver = activeUiDriver(); |
| 1108 | if (!uiDriver) |
| 1109 | return; |
| 1110 | |
| 1111 | HAL_Driver* liveDriver = driver(0); |
| 1112 | if (!liveDriver || liveDriver == uiDriver) |
| 1113 | return; |
| 1114 | |
| 1115 | QSignalBlocker blocker(liveDriver); |
| 1116 | for (const auto& prop : uiDriver->driverProperties()) |
| 1117 | liveDriver->setDriverProperty(prop.key, prop.value); |
| 1118 | } |
| 1119 | |
| 1120 | /** |
| 1121 | * @brief Applies source[0]'s busType and connectionSettings to the matching UI-config driver; |
nothing calls this directly
no test coverage detected