From 632e2826c0ad942cae3f8c0931b05acaa3c388eb 2013-11-04 09:27:25 From: Titta Heikkala Date: 2013-11-04 09:27:25 Subject: [PATCH] Fix regression with right click zooming Right click zooming fixed for non-visible rubber band cases. Task-number: QTRD-2531 Change-Id: Icb008e4d14e171f7037f3679c31e1e059b5990cd Reviewed-by: Miikka Heikkinen --- diff --git a/src/qchartview.cpp b/src/qchartview.cpp index 86a117f..8206a33 100644 --- a/src/qchartview.cpp +++ b/src/qchartview.cpp @@ -211,7 +211,7 @@ void QChartView::mouseReleaseEvent(QMouseEvent *event) event->accept(); } - if (event->button() == Qt::RightButton) { + } else if (d_ptr->m_rubberBand && event->button() == Qt::RightButton) { // If vertical or horizontal rubberband mode, restrict zoom out to specified axis. // Since there is no suitable API for that, use zoomIn with rect bigger than the // plot area. @@ -230,7 +230,6 @@ void QChartView::mouseReleaseEvent(QMouseEvent *event) d_ptr->m_chart->zoomOut(); } event->accept(); - } } else { #endif QGraphicsView::mouseReleaseEvent(event);