summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2008-06-23 16:12:03 +0200
committerSamuel Rødal <sroedal@trolltech.com>2008-06-23 16:12:03 +0200
commitda1f91cd8fabb4dcf3aea99c9df3c1afa617b657 (patch)
treeaac44b1954e47757601648d908856e0c30bd278a
parent92db0ece25140a517f5692869bd5bae47a102523 (diff)
Don't update if we're not on auto-rotate.
-rw-r--r--openglscene.cpp6
1 files 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);