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

Method onExternallyResized

pj_plotting/widget/src/PlotWidget.cpp:951–972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

949}
950
951void 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
974void PlotWidget::onDragEnterEvent(QDragEnterEvent* event) {
975 dragging_ = {};

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected