diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-01 03:43:27 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-01 03:43:27 (GMT) |
commit | 14de8cecfa5b5428d597c9cca111ee0f3f89502f (patch) | |
tree | 1106e55230630e9c801079280cc674ade9bfc625 /src/gui/graphicsview/qgraphicstransform.cpp | |
parent | 56ca8ea340aa55071c7d616e421d67a3d3622058 (diff) | |
parent | 538a415b8296db36355609d6e84137b9354967a7 (diff) | |
download | Qt-14de8cecfa5b5428d597c9cca111ee0f3f89502f.zip Qt-14de8cecfa5b5428d597c9cca111ee0f3f89502f.tar.gz Qt-14de8cecfa5b5428d597c9cca111ee0f3f89502f.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml:
Add missing test file.
Changing width of RTL positioner doesn't relayout
Fix TextInput auto test failure on mac.
PinchArea and Flickable don't work well enough together
Fix auto test failure.
Once Image sourceSize is set there is no way to clear it.
Rotation transform with NaN angle can cause crash
Canceling image download while reading causes crash
Fix width of TextInput micro focus rectangle.
Diffstat (limited to 'src/gui/graphicsview/qgraphicstransform.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicstransform.cpp | 4 |
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); |