MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / syncWidgetsToCatalog

Method syncWidgetsToCatalog

pj_app/src/MainWindow.cpp:2379–2397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2377}
2378
2379void 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
2399void MainWindow::linkedZoomOut() {
2400 if (!button_link_->isChecked()) {

Callers

nothing calls this directly

Calls 4

revalidateMethod · 0.80
objectWidgetMethod · 0.80
revalidateObjectsMethod · 0.80
clearToPlaceholderMethod · 0.80

Tested by

no test coverage detected