              if (zoomMag < 1.0f)
                  zoomMag = 1.0f;
 +          #endif
++            if (zoomIncrement > 0.0f && viewVector.lengthSquared() < 1e-35f)
++              return;  // Zoom min limit
++            if (zoomIncrement < 0.0f && viewVector.lengthSquared() > 1e+35f)
++              return;  // Zoom max limit
  
 -            QRay3D viewLine(camera()->center(), viewVector.normalized());
 -            camera()->setEye(viewLine.point(zoomMag));

 
 QT_BEGIN_NAMESPACE
 
@@ -1379,17 +1380,20 @@
     } else {
         // enable this to get wheel navigation that actually zooms by moving the
         // camera back, as opposed to making the angle of view wider.        

+        QVector3D viewVector= camera()->center() - camera()->eye();
+        //qreal zoomMag = viewVector.length();
+        qreal zoomIncrement = float(delta) / 100.0f;
+        zoomIncrement = qBound(-0.95f, float(zoomIncrement), 0.95f);
         if (!qFuzzyIsNull(zoomIncrement))
         {
-            zoomMag += zoomIncrement;
