summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qtransform.h
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2010-03-11 14:21:43 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2010-03-11 17:14:19 (GMT)
commit4fc638c0b4562f4b1e9c9a367535e4b570602942 (patch)
tree4ec5b4b31db69397be8ea3c0ea4cce382d7d809b /src/gui/painting/qtransform.h
parent65f5cecdd0343d816d9abb8342bd8b2faecdf3b8 (diff)
downloadQt-4fc638c0b4562f4b1e9c9a367535e4b570602942.zip
Qt-4fc638c0b4562f4b1e9c9a367535e4b570602942.tar.gz
Qt-4fc638c0b4562f4b1e9c9a367535e4b570602942.tar.bz2
Fixed bug in QTransform::type() after using operator/ or operator*.
The m_dirty variable is not a bit flag any more. This caused the switch in QTransform::type() to not match any of the transformation types, and m_type was left at TxNone. Task-number: QTBUG-8557 Reviewed-by: Gunnar Sletta
Diffstat (limited to 'src/gui/painting/qtransform.h')
-rw-r--r--src/gui/painting/qtransform.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index 9909643..212a582 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -293,7 +293,8 @@ inline QTransform &QTransform::operator*=(qreal num)
affine._dx *= num;
affine._dy *= num;
m_33 *= num;
- m_dirty |= TxScale;
+ if (m_dirty < TxScale)
+ m_dirty = TxScale;
return *this;
}
inline QTransform &QTransform::operator/=(qreal div)
@@ -316,7 +317,7 @@ inline QTransform &QTransform::operator+=(qreal num)
affine._dx += num;
affine._dy += num;
m_33 += num;
- m_dirty |= TxProject;
+ m_dirty = TxProject;
return *this;
}
inline QTransform &QTransform::operator-=(qreal num)
@@ -332,7 +333,7 @@ inline QTransform &QTransform::operator-=(qreal num)
affine._dx -= num;
affine._dy -= num;
m_33 -= num;
- m_dirty |= TxProject;
+ m_dirty = TxProject;
return *this;
}