diff options
-rw-r--r-- | openglscene.cpp | 6 |
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); |