diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2016-09-13 14:23:17 -0700 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2016-09-23 16:43:37 +0300 |
commit | 8f965b2c25f0fe1a5be4bc054c174656a09f03a4 (patch) | |
tree | 95e14d0ad85c4c2559fca528010caf71e625618e /platform | |
parent | 746bb678c8a16919adae94ac4cd1ccc8433c1b8c (diff) | |
download | qtlocation-mapboxgl-8f965b2c25f0fe1a5be4bc054c174656a09f03a4.tar.gz |
[Qt] Add map pitch support on the example app
Diffstat (limited to 'platform')
-rw-r--r-- | platform/qt/app/mapwindow.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/qt/app/mapwindow.cpp b/platform/qt/app/mapwindow.cpp index e8319365b7..55ab05cc01 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 |