--- a/src/gldraw.cpp Tue May 28 02:59:54 2013 +0300 +++ b/src/gldraw.cpp Tue May 28 18:30:40 2013 +0300 @@ -959,11 +959,12 @@ void GLRenderer::mousePressEvent (QMouseEvent* ev) { m_totalmove = 0; - if (ev->modifiers () & Qt::ShiftModifier) { + if (ev->modifiers () & Qt::ControlModifier) { m_rangepick = true; m_rangeStart.setX (ev->x ()); m_rangeStart.setY (ev->y ()); - m_addpick = (m_keymods & Qt::ControlModifier); + m_addpick = (m_keymods & Qt::AltModifier); + ev->accept (); } m_lastButtons = ev->buttons (); @@ -977,7 +978,15 @@ int dy = ev->y () - m_pos.y (); m_totalmove += abs (dx) + abs (dy); - if (ev->buttons () & Qt::LeftButton && !m_rangepick) { + const bool left = ev->buttons () & Qt::LeftButton, + mid = ev->buttons () & Qt::MidButton, + shift = ev->modifiers () & Qt::ShiftModifier; + + if (mid || (left && shift)) { + m_panX += 0.03f * dx * (zoom () / 7.5f); + m_panY -= 0.03f * dy * (zoom () / 7.5f); + m_panning = true; + } else if (left && !m_rangepick && camera () == Free) { m_rotX = m_rotX + (dy); m_rotY = m_rotY + (dx); @@ -985,12 +994,6 @@ clampAngle (m_rotY); } - if (ev->buttons () & Qt::MidButton) { - m_panX += 0.03f * dx * (zoom () / 7.5f); - m_panY -= 0.03f * dy * (zoom () / 7.5f); - m_panning = true; - } - // Start the tool tip timer if (!m_drawToolTip) m_toolTipTimer->start (1000);