| 64 | } |
| 65 | |
| 66 | bool PlotZoomer::accept(QPolygon& polygon) const { |
| 67 | QApplication::restoreOverrideCursor(); |
| 68 | if (polygon.count() < 2) { |
| 69 | return false; |
| 70 | } |
| 71 | |
| 72 | const QRect rect(polygon[0], polygon[polygon.count() - 1]); |
| 73 | const QRectF zoom_rect = invTransform(rect.normalized()); |
| 74 | if (zoom_rect.width() < minZoomSize().width() && zoom_rect.height() < minZoomSize().height()) { |
| 75 | return false; |
| 76 | } |
| 77 | return QwtPlotZoomer::accept(polygon); |
| 78 | } |
| 79 | |
| 80 | void PlotZoomer::applyKeepAspectRatio(QRectF& rect) const { |
| 81 | if (!keep_aspect_ratio_) { |
no test coverage detected