From da1f91cd8fabb4dcf3aea99c9df3c1afa617b657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 23 Jun 2008 16:12:03 +0200 Subject: Don't update if we're not on auto-rotate. --- openglscene.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openglscene.cpp b/openglscene.cpp index eb4f1ae..30ac1b0 100644 --- a/openglscene.cpp +++ b/openglscene.cpp @@ -212,11 +212,12 @@ void OpenGLScene::drawBackground(QPainter *painter, const QRectF &) glMatrixMode(GL_PROJECTION); glPopMatrix(); + + if (m_autoRotate) + QTimer::singleShot(20, this, SLOT(update())); } painter->restore(); - - QTimer::singleShot(20, this, SLOT(update())); } void OpenGLScene::setModel(Model *model) @@ -330,7 +331,6 @@ void OpenGLScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) m_rotating = false; } - void OpenGLScene::wheelEvent(QGraphicsSceneWheelEvent *event) { QGraphicsScene::wheelEvent(event); -- cgit v1.2.3