| 2377 | } |
| 2378 | |
| 2379 | void MainWindow::syncWidgetsToCatalog() { |
| 2380 | // Each widget prunes its OWN now-invalid pieces against the live catalog/store: |
| 2381 | // - plots drop curves whose source key is gone (empty plot stays, reusable); |
| 2382 | // - object viewers drop layers whose topic was evicted, reporting empty so the |
| 2383 | // shell resets that dock to the reusable placeholder. |
| 2384 | forEachPlot([](PlotWidget* plot) { plot->revalidate(); }); |
| 2385 | forEachDock([](DockWidget* dock) { |
| 2386 | auto* viewer = dynamic_cast<IObjectViewer*>(dock->objectWidget()); |
| 2387 | if (viewer != nullptr && !viewer->revalidateObjects()) { |
| 2388 | dock->clearToPlaceholder(); |
| 2389 | } |
| 2390 | }); |
| 2391 | // Clearing a dock to its placeholder doesn't change ADS focus, so the right |
| 2392 | // panel won't refresh on its own. Re-evaluate it against the active tab's |
| 2393 | // focused dock: if that dock was just emptied, the panel falls back to the |
| 2394 | // empty page; otherwise this is a no-op. Keying off the active tab (rather |
| 2395 | // than a remembered pointer) avoids ever painting a hidden tab's dock. |
| 2396 | onDockFocused(activeFocusedDock()); |
| 2397 | } |
| 2398 | |
| 2399 | void MainWindow::linkedZoomOut() { |
| 2400 | if (!button_link_->isChecked()) { |
nothing calls this directly
no test coverage detected