| 1838 | } |
| 1839 | |
| 1840 | void MainWindow::onPlotTabAdded(PlotDocker* docker) { |
| 1841 | if (docker == nullptr) { |
| 1842 | return; |
| 1843 | } |
| 1844 | connect(docker, &PlotDocker::plotWidgetAdded, this, &MainWindow::onPlotAdded, Qt::UniqueConnection); |
| 1845 | // ADS focus is the single source of truth for "which widget is active": |
| 1846 | // it fires on canvas click and on tab-titlebar click. PlotDocker re-emits |
| 1847 | // it as dockFocused(DockWidget*) so MainWindow can route to the right |
| 1848 | // sidepanel page (plot config / 2D / 3D) without pulling in ADS types. |
| 1849 | connect(docker, &PlotDocker::dockFocused, this, &MainWindow::onDockFocused, Qt::UniqueConnection); |
| 1850 | // Placeholder 2D/3D icon click → build + adopt the empty scene dock here (the |
| 1851 | // shell owns the family→kind mapping). The first topic dropped into such an |
| 1852 | // empty dock seeds streaming playback, matching the placeholder→drop path. |
| 1853 | connect(docker, &PlotDocker::objectFamilyRequested, this, &MainWindow::onObjectFamilyRequested, Qt::UniqueConnection); |
| 1854 | connect( |
| 1855 | docker, &PlotDocker::firstObjectTopicAdded, this, &MainWindow::seedStreamingPlaybackFromDrop, |
| 1856 | Qt::UniqueConnection); |
| 1857 | for (int index = 0; index < docker->plotCount(); ++index) { |
| 1858 | if (DockWidget* dock = docker->plotAt(index)) { |
| 1859 | onPlotAdded(dock->plotWidget()); |
| 1860 | } |
| 1861 | } |
| 1862 | bindEditorToPlot(firstPlotOfActiveTab()); |
| 1863 | } |
| 1864 | |
| 1865 | void MainWindow::onPlotAdded(PlotWidget* plot) { |
| 1866 | if (plot == nullptr) { |
nothing calls this directly
no test coverage detected