* @brief Queues a single FrameBuilder re-sync on the event loop so the live dashboard * picks up programmatic project edits; a burst of mutating commands (project.batch, * rapid tool calls) collapses into one apply. */
| 179 | * rapid tool calls) collapses into one apply. |
| 180 | */ |
| 181 | static void scheduleProjectApply() |
| 182 | { |
| 183 | static bool pending = false; |
| 184 | if (pending) |
| 185 | return; |
| 186 | |
| 187 | pending = true; |
| 188 | QMetaObject::invokeMethod( |
| 189 | QCoreApplication::instance(), |
| 190 | [] { |
| 191 | pending = false; |
| 192 | DataModel::FrameBuilder::instance().syncFromProjectModel(); |
| 193 | }, |
| 194 | Qt::QueuedConnection); |
| 195 | } |
| 196 | |
| 197 | /** |
| 198 | * @brief Execute a registered command |
no test coverage detected