From 8f965b2c25f0fe1a5be4bc054c174656a09f03a4 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Tue, 13 Sep 2016 14:23:17 -0700 Subject: [PATCH] [Qt] Add map pitch support on the example app --- platform/qt/app/mapwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/qt/app/mapwindow.cpp b/platform/qt/app/mapwindow.cpp index e8319365b..55ab05cc0 100644 --- a/platform/qt/app/mapwindow.cpp +++ b/platform/qt/app/mapwindow.cpp @@ -160,7 +160,9 @@ void MapWindow::mouseMoveEvent(QMouseEvent *ev) #endif if (!delta.isNull()) { - if (ev->buttons() == Qt::LeftButton) { + if (ev->buttons() == Qt::LeftButton && ev->modifiers() & Qt::ShiftModifier) { + m_map.setPitch(m_map.pitch() - delta.y()); + } else if (ev->buttons() == Qt::LeftButton) { m_map.moveBy(delta); } else if (ev->buttons() == Qt::RightButton) { #if QT_VERSION < 0x050000