726 painter.drawText (pos.x(), pos.y() - 8, pos3d.toString (true)); |
726 painter.drawText (pos.x(), pos.y() - 8, pos3d.toString (true)); |
727 } |
727 } |
728 |
728 |
729 // ============================================================================= |
729 // ============================================================================= |
730 // |
730 // |
731 void GLRenderer::clampAngle(double& angle) const |
|
732 { |
|
733 while (angle < 0) |
|
734 angle += 360.0; |
|
735 |
|
736 while (angle > 360.0) |
|
737 angle -= 360.0; |
|
738 } |
|
739 |
|
740 // ============================================================================= |
|
741 // |
|
742 void GLRenderer::mouseReleaseEvent(QMouseEvent* ev) |
731 void GLRenderer::mouseReleaseEvent(QMouseEvent* ev) |
743 { |
732 { |
744 bool wasLeft = (m_lastButtons & Qt::LeftButton) and not (ev->buttons() & Qt::LeftButton); |
733 bool wasLeft = (m_lastButtons & Qt::LeftButton) and not (ev->buttons() & Qt::LeftButton); |
745 Qt::MouseButtons releasedbuttons = m_lastButtons & ~ev->buttons(); |
734 Qt::MouseButtons releasedbuttons = m_lastButtons & ~ev->buttons(); |
746 m_panning = false; |
735 m_panning = false; |