| 949 | } |
| 950 | |
| 951 | void PlotWidget::onExternallyResized(const QRectF& rect) { |
| 952 | if (curveList().empty()) { |
| 953 | return; |
| 954 | } |
| 955 | if (isXYPlot()) { |
| 956 | if (keepRatioXY()) { |
| 957 | // Wheel-zoom (magnifier) and pan bypass the drag-zoom keep-ratio path, |
| 958 | // and the magnifier clamps each axis independently at the data bounds — |
| 959 | // that asymmetry skews a 1:1 circle into an ellipse. Re-impose the |
| 960 | // canvas aspect ratio on the event's rect (not currentBoundingRect(): |
| 961 | // the magnifier emits this signal before it replots, so the current |
| 962 | // view is still stale here). |
| 963 | applyRectKeepingRatio(rect); |
| 964 | replot(); |
| 965 | } |
| 966 | return; // XY never emits rectChanged (PJ3 parity). |
| 967 | } |
| 968 | if (!isZoomLinkEnabled()) { |
| 969 | return; |
| 970 | } |
| 971 | emit rectChanged(this, rect); |
| 972 | } |
| 973 | |
| 974 | void PlotWidget::onDragEnterEvent(QDragEnterEvent* event) { |
| 975 | dragging_ = {}; |