summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicstransform.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-04-28 07:59:43 (GMT)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-04-28 07:59:43 (GMT)
commit0d70b0a9faecf042fdb20e0056bdaaec289b851c (patch)
tree5ad6397fbab4dac6b37f740256aa585183e147c1 /src/gui/graphicsview/qgraphicstransform.cpp
parentd45ec470519d1075ebf299b74cbb846a0c7d99af (diff)
parentce4996b624678f37b13fbb7db810cccd8970a889 (diff)
downloadQt-0d70b0a9faecf042fdb20e0056bdaaec289b851c.zip
Qt-0d70b0a9faecf042fdb20e0056bdaaec289b851c.tar.gz
Qt-0d70b0a9faecf042fdb20e0056bdaaec289b851c.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7
Conflicts: src/s60installs/eabi/QtGuiu.def
Diffstat (limited to 'src/gui/graphicsview/qgraphicstransform.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicstransform.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicstransform.cpp b/src/gui/graphicsview/qgraphicstransform.cpp
index 06df788..513c41f 100644
--- a/src/gui/graphicsview/qgraphicstransform.cpp
+++ b/src/gui/graphicsview/qgraphicstransform.cpp
@@ -92,6 +92,7 @@
#include "qgraphicstransform_p.h"
#include <QDebug>
#include <QtCore/qmath.h>
+#include <QtCore/qnumeric.h>
#ifndef QT_NO_GRAPHICSVIEW
QT_BEGIN_NAMESPACE
@@ -467,6 +468,7 @@ void QGraphicsRotation::setOrigin(const QVector3D &point)
item will be rotated counter-clockwise. Normally the rotation angle will be
in the range (-360, 360), but you can also provide numbers outside of this
range (e.g., a angle of 370 degrees gives the same result as 10 degrees).
+ Setting the angle to NaN results in no rotation.
\sa origin
*/
@@ -570,7 +572,7 @@ void QGraphicsRotation::applyTo(QMatrix4x4 *matrix) const
{
Q_D(const QGraphicsRotation);
- if (d->angle == 0. || d->axis.isNull())
+ if (d->angle == 0. || d->axis.isNull() || qIsNaN(d->angle))
return;
matrix->translate(d->origin);