summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-19 12:50:48 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-19 12:52:35 (GMT)
commit3772d559f7e19189ceeac1094f7526176681ba1c (patch)
treeba41865fc25aec3a8072ba401561ddabec78f916
parent933bddab13c2cec231beb623f77c7fbb0bbbccd5 (diff)
downloadQt-3772d559f7e19189ceeac1094f7526176681ba1c.zip
Qt-3772d559f7e19189ceeac1094f7526176681ba1c.tar.gz
Qt-3772d559f7e19189ceeac1094f7526176681ba1c.tar.bz2
Small optimization to QGraphicsItemPrivate::combineTransform(To|From)Parent.
Every cycle counts :)
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index b2c04ca..a304027 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -797,7 +797,7 @@ QPointF QGraphicsItemPrivate::genericMapFromScene(const QPointF &pos,
void QGraphicsItemPrivate::combineTransformToParent(QTransform *x, const QTransform *viewTransform) const
{
// COMBINE
- if (itemIsUntransformable() && viewTransform) {
+ if (viewTransform && itemIsUntransformable()) {
*x = q_ptr->deviceTransform(*viewTransform);
} else {
if (transformData)
@@ -819,7 +819,7 @@ void QGraphicsItemPrivate::combineTransformToParent(QTransform *x, const QTransf
void QGraphicsItemPrivate::combineTransformFromParent(QTransform *x, const QTransform *viewTransform) const
{
// COMBINE
- if (itemIsUntransformable() && viewTransform) {
+ if (viewTransform && itemIsUntransformable()) {
*x = q_ptr->deviceTransform(*viewTransform);
} else {
x->translate(pos.x(), pos.y());