| 2153 | } |
| 2154 | |
| 2155 | void MainWindow::onPlotZoomChanged(PlotWidget* modified, QRectF rect) { |
| 2156 | if (!button_link_->isChecked()) { |
| 2157 | return; |
| 2158 | } |
| 2159 | if (modified == nullptr || modified->isEmpty() || modified->isXYPlot() || !modified->isZoomLinkEnabled()) { |
| 2160 | return; |
| 2161 | } |
| 2162 | |
| 2163 | forEachPlot([modified, rect](PlotWidget* plot) { |
| 2164 | if (plot == modified || plot->isEmpty() || plot->isXYPlot() || !plot->isZoomLinkEnabled()) { |
| 2165 | return; |
| 2166 | } |
| 2167 | // Linked zoom only ever aligns the horizontal (time) range: copy the source's |
| 2168 | // X extent onto each peer while leaving its vertical range exactly as the user |
| 2169 | // left it. A purely-vertical gesture (wheel on the left axis, "Zoom Out |
| 2170 | // Vertically") therefore carries an unchanged X and resolves to a no-op here. |
| 2171 | QRectF peer_rect = plot->currentBoundingRect(); |
| 2172 | peer_rect.setLeft(rect.left()); |
| 2173 | peer_rect.setRight(rect.right()); |
| 2174 | plot->setZoomRectangle(peer_rect, false); |
| 2175 | plot->replot(); |
| 2176 | }); |
| 2177 | } |
| 2178 | |
| 2179 | void MainWindow::onTrackerMovedFromWidget(QPointF point) { |
| 2180 | session_->playbackEngine().setCurrentTime(displaySeconds(point.x())); |
nothing calls this directly
no test coverage detected