summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTitta Heikkala <titta.heikkala@digia.com>2013-11-04 10:29:54 +0200
committerTitta Heikkala <titta.heikkala@digia.com>2013-11-04 11:27:25 +0200
commit632e2826c0ad942cae3f8c0931b05acaa3c388eb (patch)
treea039bbda1b10a8dca39c75830d21c662e5b345d3
parent5086492877e0de885ac81c1e9bc151cf796999b6 (diff)
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 <miikka.heikkinen@digia.com>
-rw-r--r--src/qchartview.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qchartview.cpp b/src/qchartview.cpp
index 86a117f5..8206a337 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);